Skip to content

Instantly share code, notes, and snippets.

Forked from oscartbeaumont/setup.ps1
Created May 10, 2022 10:47
What would you like to do?
Setup Machine
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
echo "Configure Computer Name"
$computerName = Read-Host 'Enter New Computer Name'
Write-Host "Renaming this computer to: " $computerName -ForegroundColor Yellow
Rename-Computer -NewName $computerName
echo "Fixing time"
Set-TimeZone "W. Australia Standard Time"
net start w32time
W32tm /resync /force
echo "Reconfiguring Winget to Support Microsoft Store applications"
$settings = Get-Content "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json" -raw | ConvertFrom-Json
$settings | Add-Member -NotePropertyName experimentalFeatures -NotePropertyValue @{
experimentalMSStore = $true
} -Force
$settings | ConvertTo-Json -depth 32 | Set-Content "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json"
echo "Installing Store Software..."
# TODO: Spotify, Messenger, Slack, Eartrumpet, Netflix
echo "Installing Desktop Software..."
winget install Google.Chrome
winget install Spotify.Spotify
winget install Bitwarden.Bitwarden
winget install Discord.Discord
winget install Google.BackupAndSync
winget install Lexikos.AutoHotkey
winget install GitHub.GitHubDesktop
winget install Microsoft.VisualStudioCode
winget install Valve.Steam
winget install Arduino.Arduino
winget install File-New-Project.EarTrumpet
echo "Removing Windows Preinstalled Rubish"
$uwpRubbishApps = @(
foreach ($uwp in $uwpRubbishApps) {
Get-AppxPackage -Name $uwp | Remove-AppxPackage
# - Barrier + Configure it???
# - Burp Suite
# - Postman
# TODO: Deploy and Configure Windows System for Linux
# TODO: Deploy Autohotkey scripts to startup
# TODO: Windows drivers for ESP32 Comm
# TODO: Low battery warning
Write-Host "------------------------------------" -ForegroundColor Green
Read-Host -Prompt "Setup is done, restart is needed, press [ENTER] to restart computer."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment