Skip to content

Instantly share code, notes, and snippets.

@charliesolomon
Last active July 5, 2023 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charliesolomon/7d30371e9d0aa3fd3a0f01ebee4c89b3 to your computer and use it in GitHub Desktop.
Save charliesolomon/7d30371e9d0aa3fd3a0f01ebee4c89b3 to your computer and use it in GitHub Desktop.
migration-2023-begin
wmic bios get serialnumber
# Install Chocolatey package manager:
Set-ExecutionPolicy AllSigned
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'))
# Install Google Chrome browser:
choco install -y googlechrome
# Install SetDefaultBrowser utility:
choco install -y setdefaultbrowser
# Set configs for current user:
SetDefaultBrowser.exe chrome
get-appxpackage *microsoft.windowscommunicationsapps* | remove-appxpackage
Get-AppxPackage *WindowsStore* | Remove-Appxpackage
ps onedrive | Stop-Process -Force
start-process "$env:windir\SysWOW64\OneDriveSetup.exe" "/uninstall"
# Disable the privacy experience page for all new users:
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\OOBE /v "DisablePrivacyExperience" /d 1
# Add startup tasks to configure computer for next user:
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "GraceStartup1" /d "SetDefaultBrowser.exe chrome"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "GraceStartup2" /d "powershell -command 'get-appxpackage *microsoft.windowscommunicationsapps* | remove-appxpackage'"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "GraceStartup3" /d "powershell -command 'get-appxpackage *WindowsStore* | remove-appxpackage'"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "GraceStartup5" /d "powershell -command 'ps onedrive | Stop-Process -Force; start-process $env:windir\SysWOW64\OneDriveSetup.exe /uninstall'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment