We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05492b3 commit fd3a332Copy full SHA for fd3a332
(Code snippets)/Administrative privileges.ps1
@@ -0,0 +1,5 @@
1
+function AmIAdmin {
2
+ $MyId=[System.Security.Principal.WindowsIdentity]::GetCurrent()
3
+ $WindowsPrincipal=New-Object System.Security.Principal.WindowsPrincipal( $MyId )
4
+ return $WindowsPrincipal.IsInRole( [System.Security.Principal.WindowsBuiltInRole]::Administrator )
5
+}
0 commit comments