Skip to content

Test-Admin

SYNOPSIS

Test if the current context is running as a specified role.

SYNTAX

__AllParameterSets

Test-Admin [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

This function checks if the current user context has Administrator privileges on Windows or is root on Unix-based systems. It returns $true if the user has the required privileges, otherwise $false.

EXAMPLES

EXAMPLE 1

Test-Admin

Test if the current context is running as an Administrator.

PARAMETERS

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.Boolean

{{ Fill in the Description }}

NOTES