Guest User

Untitled

a guest
Feb 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. try {
  2. # Boxstarter options
  3. $Boxstarter.RebootOk=$true
  4. $Boxstarter.NoPassword=$false # Is this a machine with no logon password?
  5. $Boxstarter.AutoLogin=$true
  6.  
  7. Update-ExecutionPolicy Unrestricted
  8. Disable-UAC
  9. #########################
  10. #### requires reboot ####
  11. #########################
  12. Disable-InternetExplorerESC
  13. cinst dotnet3.5 -y
  14. cinst dotnet4.7 -y
  15. #cinst powershell
  16.  
  17. #######################
  18. #### general utils ####
  19. #######################
  20. cinst chocolatey-core.extension -y
  21. cinst 7zip.install -y
  22. #cinst googlechrome -y
  23. cinst firefox -y
  24. cinst flashplayerplugin -y
  25. cinst notepadplusplus.install -y
  26. cinst filezilla -y
  27. cinst sysinternals -y
  28. cinst visualstudiocode -y
  29. cinst windirstat -y
  30.  
  31. #cinst citrix-receiver -y
  32. #cinst github-desktop -y
  33. #cinst git.install -y
  34. cinst poshgit -y
  35.  
  36. cinst putty.install -y
  37. cinst vmwarevsphereclient -y
  38. cinst vmware-tools -y
  39. cinst jre8 -y
  40.  
  41. Write-BoxstarterMessage "Trusting PSGallery..."
  42. Get-PackageProvider -Name NuGet -ForceBootstrap
  43. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
  44.  
  45. Write-BoxstarterMessage "Installing PowerShellGet Module"
  46. Install-Module -Name PowerShellGet -Scope AllUsers -Force
  47.  
  48. Write-BoxstarterMessage "Installing posh-git Module"
  49. Install-Module -Name posh-git -Scope AllUsers -Force
  50.  
  51. #Write-BoxstarterMessage "Installing oh-my-posh Module"
  52. #Install-Module -Name oh-my-posh -Scope AllUsers -Force
  53.  
  54. Write-BoxstarterMessage "Installing VMware PowerCLI Module"
  55. Install-Module -Name VMware.PowerCLI -Scope AllUsers -Force
  56.  
  57. Write-BoxstarterMessage "Installing PowerNSX Module"
  58. Install-Module -Name PowerNSX -Scope AllUsers -Force
  59.  
  60. Write-BoxstarterMessage "Installing PowervRA Module"
  61. Install-Module -Name PowervRA -Scope AllUsers -Force
  62.  
  63. Write-BoxstarterMessage "Installing PowervRO Module"
  64. Install-Module -Name PowervRO -Scope AllUsers -Force
  65.  
  66. ########################################################
  67. #### NONE OF THE COMMANDS BELOW WORK - FIND OUT WHY ####
  68. ########################################################
  69. #Getting the Package Provider to work... this doesn't work
  70. #Install-PackageProvider Nuget –force
  71. #Write-BoxstarterMessage "Installing PowerShellGet Module..."
  72. #Install-Module –Name PowerShellGet –Force
  73. #Find-Module PowerShellGet | Install-Module -SkipPublisherCheck -Confirm #-Force
  74. #Write-BoxstarterMessage "Installing Posh-Git Module..."
  75. #Find-Module Posh-Git | Install-Module -SkipPublisherCheck -Confirm #-Force
  76. # Installing PowerCLI
  77. #Write-BoxstarterMessage "Installing VMware PowerCLI Module..."
  78. #Install-Module -Name VMware.PowerCLI -SkipPublisherCheck -Force
  79. #Find-Module VMware.PowerCLI | Install-Module -SkipPublisherCheck -Confirm #-Force
  80. #Installing PowerNSX
  81. #Write-BoxstarterMessage "Installing PowerNSX Module..."
  82. #Find-Module PowerNSX | Install-Module -SkipPublisherCheck -Confirm #-Force
  83.  
  84. #################################
  85. #### NOW get windows updates ####
  86. #################################
  87. Install-WindowsUpdate -AcceptEula
  88. Enable-MicrosoftUpdate
  89. #Install-WindowsUpdate -GetUpdatesFromMS -AcceptEula
  90.  
  91. #################
  92. #### cleanup ####
  93. #################
  94. del C:\eula*.txt
  95. del C:\install.*
  96. del C:\vcredist.*
  97. del C:\vc_red.*
  98.  
  99. ###############################
  100. #### windows features ####
  101. ###############################
  102.  
  103. Write-BoxstarterMessage "Setting Windows Explorer Settings!!"
  104. Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar
  105.  
  106. # Enable Remote Desktop
  107. Enable-RemoteDesktop
  108.  
  109. # Setting Time Zone
  110. Write-BoxstarterMessage "Setting time zone to Eastern Standard Time"
  111. & C:\Windows\system32\tzutil /s "Eastern Standard Time"
  112.  
  113. ################################
  114. #### restore disabled stuff ####
  115. ################################
  116.  
  117. Enable-UAC
  118. Install-WindowsUpdate -AcceptEula
  119. Write-BoxstarterMessage "Machine is complete!"
  120. }
  121. catch {
  122. Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message)
  123. throw
  124. }
Add Comment
Please, Sign In to add comment