Last active
January 24, 2018 17:51
-
-
Save andrewbbrown/2273da19e8a960eae617412bfef6b50f to your computer and use it in GitHub Desktop.
This file contains 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
try { | |
# Boxstarter options | |
$Boxstarter.RebootOk=$true | |
$Boxstarter.NoPassword=$false # Is this a machine with no logon password? | |
$Boxstarter.AutoLogin=$true | |
Update-ExecutionPolicy Unrestricted | |
Disable-UAC | |
# Trust PSGallery | |
Get-PackageProvider -Name NuGet -ForceBootstrap | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
Write-BoxstarterMessage "Installing modules" | |
Install-Module -Name PowerShellGet -Scope AllUsers | |
Install-Module -Name posh-git -Scope AllUsers -Force | |
Install-Module -Name oh-my-posh -Scope AllUsers -Force | |
Install-Module -Name VMware.PowerCLI -Scope AllUsers -Force | |
Install-Module -Name PowerNSX -Scope AllUsers -Force | |
Install-Module -Name PowervRA -Scope AllUsers -Force | |
Install-Module -Name PowervRO -Scope AllUsers -Force | |
Enable-UAC | |
Install-WindowsUpdate -AcceptEula | |
Write-BoxstarterMessage "Machine is complete!" | |
} | |
catch { | |
Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message) | |
throw | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment