Skip to content

Instantly share code, notes, and snippets.

@andrewbbrown
Last active February 27, 2021 20:51
Show Gist options
  • Save andrewbbrown/48ccf66ae16b0bd048d3c1cdbb2d3983 to your computer and use it in GitHub Desktop.
Save andrewbbrown/48ccf66ae16b0bd048d3c1cdbb2d3983 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
Write-BoxstarterMessage "Ensuring ExecutionPolicy to Unrestricted..."
Update-ExecutionPolicy Unrestricted
## Write-BoxstarterMessage "Ensuring UAC is disabled..."
## Disable-UAC
#########################
#### requires reboot ####
#########################
cinst dotnet3.5 -y
cinst dotnet4.7 -y
Write-BoxstarterMessage "Ensuring PSGallery is a trusted PSRepository..."
Get-PackageProvider -Name NuGet -ForceBootstrap
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Write-BoxstarterMessage "Ensuring the PowerShellGet module is installed..."
Install-Module -Name PowerShellGet -Scope AllUsers -Force
#################################
#### NOW get windows updates ####
#################################
#Write-BoxstarterMessage "Getting and Installing Critical Windows Updates..."
#Install-WindowsUpdate -AcceptEula
#Write-BoxstarterMessage "Ensuring Windows Updates is enabled..."
#Enable-MicrosoftUpdate
#Install-WindowsUpdate -GetUpdatesFromMS -AcceptEula
################################
#### Install Drivers ####
################################
cinst dellcommandupdate-uwp -y
################################
#--- Windows Subsystems/Features ---
cinst Microsoft-Windows-Subsystem-Linux -source windowsfeatures -y
################################
################################
#### general utils ####
################################
cinst chocolatey-core.extension -y
cinst 7zip.install -y
cinst sysinternals -y
### Web Browsing ###
cinst googlechrome --ignorecheckums -y
cinst firefox -y
cinst flashplayerplugin -y
### Slack ###
cinst slack -y
### Git Setup ###
cinst github-desktop
cinst git.install
# Need to look into alternative Git install with additional settings... (from chocolatey official)
# choco install git --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" -y
Write-BoxstarterMessage "Installing posh-git Module"
Install-Module -Name posh-git -Scope AllUsers -Force
### Text Editors ###
cinst notepadplusplus.install -y
cinst visualstudiocode -y
### File Transfer & communication ###
cinst filezilla -y
cinst putty.install -y
cinst winscp -y
#This version of winscp threw an error - something about could setup installer could not create a needed directory...
#cinst winscp.install -y
### AppDev ###
cinst golang -y
cinst govc -y
### Packer ###
cinst packer -y
### VMWare Workstation ###
cinst vmwareworkstation -y
#cinst vmwarevsphereclient -y
#cinst vmware-tools -y
#cinst jre8
#cinst windirstat
#cinst citrix-receiver
###############################
#### windows features ####
###############################
Write-BoxstarterMessage "Ensuring that Windows Explorer Settings are correct (Developer features... file extensions... full file paths... show hidden files... show protected os files...)"
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
#Write-BoxstarterMessage "Ensuring remote desktop is enabled..."
#Enable-RemoteDesktop
Write-BoxstarterMessage "Ensuring Bing Internet Search is disabled..."
Disable-BingSearch
Write-BoxstarterMessage "Ensuring Game Bar Tips is disabled..."
Disable-GameBarTips
#Write-BoxstarterMessage "Moving personal library directory to SkyDrive..."
#Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"
#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
#Install-Module -Name VMware.PowerCLI -Scope AllUsers -Force
Write-BoxstarterMessage "Installing VMware PowerCLI Module"
Update-Module -Name VMware.PowerCLI -Force
#Update-Module -Name VMware.PowerCLI -Scope AllUsers -Force
#################
#### cleanup ####
#################
#del C:\eula*.txt
#del C:\install.*
#del C:\vcredist.*
#del C:\vc_red.*
################################
#### restore disabled stuff ####
################################
#Write-BoxstarterMessage "Ensuring UAC is enabled once again..."
#Enable-UAC
#Write-BoxstarterMessage "Ensuring there are no additional Windows Updates to get..."
#Install-WindowsUpdate -AcceptEula
# Setting Time Zone
Write-BoxstarterMessage "Setting time zone to Central Standard Time"
& C:\Windows\system32\tzutil /s "Central Standard Time"
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