Last active
April 18, 2016 11:04
-
-
Save aliostad/a20f0c8d6a439dcff34e63e4a6559008 to your computer and use it in GitHub Desktop.
Azure VM bootstrapper
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
# Usage: | |
# iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/aliostad/a20f0c8d6a439dcff34e63e4a6559008/raw/0e445d869eb47e525512053638489920547a7d75/azure-vm-bootstrapper.ps1')) | |
# Bootstraps the Azure VM by modyifying settings and installing below: | |
# 1. Turn off annoying Intrenet Explorer enhanced security | |
# 2. Install chocolatey | |
# 3. Install PerfView | |
# 4. Install DebugView | |
# 5. Install SuperBenchmarker | |
# 6. Install notepad++ | |
# 7. Install windbg | |
function Disable-InternetExplorerESC { | |
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" | |
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" | |
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 | |
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 | |
Stop-Process -Name Explorer | |
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green | |
} | |
function Enable-InternetExplorerESC { | |
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" | |
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" | |
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 1 | |
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 1 | |
Stop-Process -Name Explorer | |
Write-Host "IE Enhanced Security Configuration (ESC) has been enabled." -ForegroundColor Green | |
} | |
function Disable-UserAccessControl { | |
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000 | |
Write-Host "User Access Control (UAC) has been disabled." -ForegroundColor Green | |
} | |
# Source from http://stackoverflow.com/questions/9368305/disable-ie-security-on-windows-server-via-powershell | |
Disable-InternetExplorerESC | |
# chocolatey | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
# perfview | |
cinst perfview -y | |
# debugview | |
cinst dbgview -y | |
# superbenchmarker | |
cinst SuperBenchmarker | |
# notepad++ | |
cinst notepadplusplus -y | |
# windbg | |
cinst windbg -y | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment