Skip to content

Instantly share code, notes, and snippets.

@andrewbbrown
Last active January 24, 2018 17:51
Show Gist options
  • Save andrewbbrown/2273da19e8a960eae617412bfef6b50f to your computer and use it in GitHub Desktop.
Save andrewbbrown/2273da19e8a960eae617412bfef6b50f to your computer and use it in GitHub Desktop.
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