Skip to content

Commit 83ac228

Browse files
Add snippet named 'RequiresRunAsAdministratorDirective'
1 parent f0adf32 commit 83ac228

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

snippets/PowerShell.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,5 +1081,12 @@
10811081
"#Requires -ShellId ${1:ID}"
10821082
],
10831083
"description": "Require a specific shell to run the script."
1084+
},
1085+
"RequiresRunAsAdministratorDirective": {
1086+
"prefix": "require-elevated",
1087+
"body": [
1088+
"#Requires -RunAsAdministrator"
1089+
],
1090+
"description": "Require that the PowerShell session must be started with elevated user rights to run the script."
10841091
}
10851092
}

0 commit comments

Comments
 (0)