< Back

Test-CAdminPrivilege

Sun Jan 12, 2020 11:19 pm

NAME Test-CAdminPrivilege



SYNOPSIS

Checks if the current user is an administrator or has administrative privileges.





SYNTAX

Test-CAdminPrivilege [<CommonParameters>]





DESCRIPTION

Many tools, cmdlets, and APIs require administative privileges. Use this function to check. Returns `True` if

the current user has administrative privileges, or `False` if he doesn't. Or she. Or it.



This function handles UAC and computers where UAC is disabled.





PARAMETERS

<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



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Test-CAdminPrivilege



Returns `True` if the current user has administrative privileges, or `False` if the user doesn't.











RELATED LINKS