Skip to content

Instantly share code, notes, and snippets.

@oscartbeaumont
Created December 22, 2020 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oscartbeaumont/2ed2ab2f67bc9a619345669206e2cc54 to your computer and use it in GitHub Desktop.
Save oscartbeaumont/2ed2ab2f67bc9a619345669206e2cc54 to your computer and use it in GitHub Desktop.
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 = @(
"Microsoft.Messaging",
"king.com.CandyCrushSaga",
"Microsoft.BingNews",
"Microsoft.MicrosoftSolitaireCollection",
"Microsoft.People",
"Microsoft.WindowsFeedbackHub",
"Microsoft.YourPhone",
"Microsoft.MicrosoftOfficeHub",
"Fitbit.FitbitCoach",
"Microsoft.GetHelp")
foreach ($uwp in $uwpRubbishApps) {
Get-AppxPackage -Name $uwp | Remove-AppxPackage
}
# TODO:
# - 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: DNS Over HTTPS
# TODO: Low battery warning
Write-Host "------------------------------------" -ForegroundColor Green
Read-Host -Prompt "Setup is done, restart is needed, press [ENTER] to restart computer."
Restart-Computer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment