Last active
January 24, 2018 18:27
-
-
Save andrewbbrown/f8165cbf776a8fdf5710efede3922bf9 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 | |
######################### | |
#### requires reboot #### | |
######################### | |
Disable-InternetExplorerESC | |
cinst dotnet3.5 | |
cinst dotnet4.7 | |
cinst powershell | |
####################### | |
#### general utils #### | |
####################### | |
cinst chocolatey-core.extension | |
cinst 7zip.install | |
cinst googlechrome | |
cinst firefox | |
cinst flashplayerplugin | |
cinst notepadplusplus.install | |
cinst filezilla | |
cinst sysinternals | |
cinst visualstudiocode | |
cinst windirstat | |
#cinst citrix-receiver | |
cinst github-desktop | |
cinst git.install | |
cinst poshgit | |
cinst putty.install -y | |
cinst vmwarevsphereclient -y | |
cinst vmware-tools -y | |
cinst jre8 | |
Write-BoxstarterMessage "Trusting PSGallery..." | |
Get-PackageProvider -Name NuGet -ForceBootstrap | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
Write-BoxstarterMessage "Installing PowerShellGet Module" | |
Install-Module -Name PowerShellGet -Scope AllUsers -Force | |
Write-BoxstarterMessage "Installing posh-git Module" | |
Install-Module -Name posh-git -Scope AllUsers -Force | |
#Write-BoxstarterMessage "Installing oh-my-posh Module" | |
#Install-Module -Name oh-my-posh -Scope AllUsers -Force | |
Write-BoxstarterMessage "Installing VMware PowerCLI Module" | |
Install-Module -Name VMware.PowerCLI -Scope AllUsers -Force | |
Write-BoxstarterMessage "Installing PowerNSX Module" | |
Install-Module -Name PowerNSX -Scope AllUsers -Force | |
Write-BoxstarterMessage "Installing PowervRA Module" | |
Install-Module -Name PowervRA -Scope AllUsers -Force | |
Write-BoxstarterMessage "Installing PowervRO Module" | |
Install-Module -Name PowervRO -Scope AllUsers -Force | |
######################################################## | |
#### NONE OF THE COMMANDS BELOW WORK - FIND OUT WHY #### | |
######################################################## | |
#Getting the Package Provider to work... this doesn't work | |
#Install-PackageProvider Nuget –force | |
#Write-BoxstarterMessage "Installing PowerShellGet Module..." | |
#Install-Module –Name PowerShellGet –Force | |
#Find-Module PowerShellGet | Install-Module -SkipPublisherCheck -Confirm #-Force | |
#Write-BoxstarterMessage "Installing Posh-Git Module..." | |
#Find-Module Posh-Git | Install-Module -SkipPublisherCheck -Confirm #-Force | |
# Installing PowerCLI | |
#Write-BoxstarterMessage "Installing VMware PowerCLI Module..." | |
#Install-Module -Name VMware.PowerCLI -SkipPublisherCheck -Force | |
#Find-Module VMware.PowerCLI | Install-Module -SkipPublisherCheck -Confirm #-Force | |
#Installing PowerNSX | |
#Write-BoxstarterMessage "Installing PowerNSX Module..." | |
#Find-Module PowerNSX | Install-Module -SkipPublisherCheck -Confirm #-Force | |
################################# | |
#### NOW get windows updates #### | |
################################# | |
Install-WindowsUpdate -AcceptEula | |
Enable-MicrosoftUpdate | |
#Install-WindowsUpdate -GetUpdatesFromMS -AcceptEula | |
################# | |
#### cleanup #### | |
################# | |
del C:\eula*.txt | |
del C:\install.* | |
del C:\vcredist.* | |
del C:\vc_red.* | |
############################### | |
#### windows features #### | |
############################### | |
Write-BoxstarterMessage "Setting Windows Explorer Settings!!" | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
# Enable Remot e | |
Enable-RemoteDesktop | |
# Setting Time Zone | |
Write-BoxstarterMessage "Setting time zone to Central Standard Time" | |
& C:\Windows\system32\tzutil /s "Central Standard Time" | |
################################ | |
#### restore disabled stuff #### | |
################################ | |
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