Skip to content

Commit

Permalink
Add snippet named 'RequiresRunAsAdministratorDirective'
Browse files Browse the repository at this point in the history
  • Loading branch information
travisclagrone committed May 22, 2019
1 parent f0adf32 commit 83ac228
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions snippets/PowerShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,5 +1081,12 @@
"#Requires -ShellId ${1:ID}"
],
"description": "Require a specific shell to run the script."
},
"RequiresRunAsAdministratorDirective": {
"prefix": "require-elevated",
"body": [
"#Requires -RunAsAdministrator"
],
"description": "Require that the PowerShell session must be started with elevated user rights to run the script."
}
}

0 comments on commit 83ac228

Please sign in to comment.