Last active
March 14, 2016 12:17
-
-
Save karstenmueller/403d4226202a295fcf8b to your computer and use it in GitHub Desktop.
Run chefdk_bootstrap with elevated permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1" | |
$out = "$env:USERPROFILE\Documents\bootstrap.ps1" | |
Invoke-WebRequest -Uri $url -OutFile $out | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$out`"" -Verb RunAs | |
exit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup your workstation for Chef development. Just execute and elevate permissions.
Work is done by chefdk_bootstrap, see https://github.com/Nordstrom/chefdk_bootstrap