Skip to content

Instantly share code, notes, and snippets.

@karstenmueller
Last active March 14, 2016 12:17
Show Gist options
  • Save karstenmueller/403d4226202a295fcf8b to your computer and use it in GitHub Desktop.
Save karstenmueller/403d4226202a295fcf8b to your computer and use it in GitHub Desktop.
Run chefdk_bootstrap with elevated permissions
$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
}
@karstenmueller
Copy link
Author

Setup your workstation for Chef development. Just execute and elevate permissions.
Work is done by chefdk_bootstrap, see https://github.com/Nordstrom/chefdk_bootstrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment