You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uses #Requires -RunAsAdministrator instead of your own methods.
6
+
.DESCRIPTION
7
+
The #Requires statement prevents a script from running unless the Windows PowerShell version, modules, snap-ins, and module and snap-in version prerequisites are met.
8
+
From Windows PowerShell 4.0, the #Requires statement let script developers require that sessions be run with elevated user rights (run as Administrator).
9
+
Script developers does not need to write their own methods any more.
10
+
To fix a violation of this rule, please consider to use #Requires -RunAsAdministrator instead of your own methods.
0 commit comments