< Back

Test-GCAdminShell

Mon Jan 13, 2020 8:07 pm

NAME Test-GCAdminShell



SYNOPSIS

Tests if the PowerShell console is running as Administrator.





SYNTAX

Test-GCAdminShell [-ShowError] [<CommonParameters>]





DESCRIPTION

When running a PowerShell console you can launch it as a standard user or as Administrator.

When run as Administrator, the console can make system changes to Windows.



This function will return True if the PowerShell console is running as Administrator, False otherwise.



For a detailed report in the console use -Verbose.



Type 'Get-Help Test-GCAdminShell -Online' for extra information.





PARAMETERS

-ShowError [<SwitchParameter>]

If this parameter is present a console error is reported if the console is not running as Administrator.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Boolean







RELATED LINKS