Advertisement
Guthlx

fresh windows bootstrap

Oct 16th, 2021
1,479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Install chocolatey
  2. Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  3.  
  4. refreshenv
  5.  
  6. # install programs
  7. choco install -y 7zip wpd
  8.  
  9. # cd to downloads dir
  10. cd C:\Users\$env:Username\Downloads
  11. # disables status bar on downloads (speeds up)
  12. $ProgressPreference = 'SilentlyContinue'
  13. # download KMS activator and unzip it
  14. Invoke-WebRequest https://github.com/massgravel/Microsoft-Activation-Scripts/releases/download/1.4/MAS_1.4_Password_1234.7z -OutFile win_activator_pw-1234.zip
  15. & 'C:\Program Files\7-Zip\7z.exe' x -y -p1234 .\win_activator_pw-1234.zip
  16. # Activate windows until 2038
  17. .\MAS_1.4\Separate-Files-Version\Activators\HWID-KMS38_Activation\KMS38_Activation.cmd /u
  18. .\MAS_1.4\Separate-Files-Version\Activators\Check_Activation_Status.cmd
  19.  
  20. # Install update module in powershell
  21. Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
  22. Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
  23. Install-Module -Name PSWindowsUpdate
  24. Set-PSRepository -Name 'PSGallery' -InstallationPolicy Untrusted
  25. Set-ExecutionPolicy -scope CurrentUser -ExecutionPolicy Bypass -Confirm:$false
  26. Import-Module -Name PSwindowsUpdate
  27.  
  28. Get-WindowsUpdate -Install
  29.  
  30. # Run WPD to further debloat Windows
  31. C:\ProgramData\chocolatey\bin\WPD.exe
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement