Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 1.15 KB

Test-IsElevated.md

File metadata and controls

53 lines (32 loc) · 1.15 KB
external help file Module Name online version schema
PSScriptTools-help.xml
PSScriptTools
2.0.0

Test-IsElevated

SYNOPSIS

Test if the current user is running elevated.

SYNTAX

Test-IsElevated [<CommonParameters>]

DESCRIPTION

This command will test if the current session is running elevated, or as Administrator. On Windows platforms, the command uses the NET Framework to determine if the user is running as Administrator. On non-Windows systems, the command is checking the user's UID value.

EXAMPLES

Example 1

PS C:\> Test-IsElevated
True

PARAMETERS

CommonParameters

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

INPUTS

None

OUTPUTS

Boolean

NOTES

Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/

RELATED LINKS

Get-PSWho