Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 -y
- cinst dotnet4.7 -y
- #cinst powershell
- #######################
- #### general utils ####
- #######################
- cinst chocolatey-core.extension -y
- cinst 7zip.install -y
- #cinst googlechrome -y
- cinst firefox -y
- cinst flashplayerplugin -y
- cinst notepadplusplus.install -y
- cinst filezilla -y
- cinst sysinternals -y
- cinst visualstudiocode -y
- cinst windirstat -y
- #cinst citrix-receiver -y
- #cinst github-desktop -y
- #cinst git.install -y
- cinst poshgit -y
- cinst putty.install -y
- cinst vmwarevsphereclient -y
- cinst vmware-tools -y
- cinst jre8 -y
- 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 Remote Desktop
- Enable-RemoteDesktop
- # Setting Time Zone
- Write-BoxstarterMessage "Setting time zone to Eastern Standard Time"
- & C:\Windows\system32\tzutil /s "Eastern Standard Time"
- ################################
- #### restore disabled stuff ####
- ################################
- Enable-UAC
- Install-WindowsUpdate -AcceptEula
- Write-BoxstarterMessage "Machine is complete!"
- }
- catch {
- Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message)
- throw
- }
Add Comment
Please, Sign In to add comment