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
Copy file name to clipboardExpand all lines: Engine/Generic/ExternalRule.cs
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ internal class ExternalRule : IExternalRule
28
28
stringparam=string.Empty;
29
29
stringsrcName=string.Empty;
30
30
stringmodPath=string.Empty;
31
-
31
+
stringparamType=string.Empty;
32
32
33
33
publicstringGetName()
34
34
{
@@ -55,6 +55,11 @@ public SourceType GetSourceType()
55
55
returnSourceType.Module;
56
56
}
57
57
58
+
publicstringGetParameterType()
59
+
{
60
+
returnthis.paramType;
61
+
}
62
+
58
63
//Set the community rule level as warning as the current implementation does not require user to specify rule severity when defining their functions in PS scripts
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.
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