mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
11 lines
343 B
PowerShell
11 lines
343 B
PowerShell
function Test-AdministrativeShell()
|
|
{
|
|
$WindowsPrincipcal = New-Object System.Security.Principal.WindowsPrincipal(
|
|
[System.Security.Principal.WindowsIdentity]::GetCurrent()
|
|
);
|
|
|
|
if ($WindowsPrincipcal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
|
return $TRUE;
|
|
}
|
|
return $FALSE;
|
|
}
|