Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function used in conjunction with Test-IsAdmin display warning message when opening profile/script
function Show-IsAdminOrNot {
$IsAdmin = Test-IsAdmin
if ( $IsAdmin -eq "False") {
Write-Warning -Message "Admin Privileges!"
}
else {
Write-Warning -Message "User Privileges"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment