Skip to content

Instantly share code, notes, and snippets.

@dcasati
Created May 18, 2025 18:04
Show Gist options
  • Save dcasati/994f9357b082184c68c91c3a9c9cdf23 to your computer and use it in GitHub Desktop.
Save dcasati/994f9357b082184c68c91c3a9c9cdf23 to your computer and use it in GitHub Desktop.
# Run PowerShell as Administrator
# 1. Install Chocolatey (if not already installed)
if (-Not (Get-Command choco -ErrorAction SilentlyContinue)) {
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
# 2. Install Applications
choco install -y vscode scratch geoGebra inkscape python git
# 3. Install Microsoft MakeCode for micro:bit and Arduino Simulator (Tinkercad & Wokwi are web-based)
# Install Web Shortcuts on Desktop
$desktop = [Environment]::GetFolderPath('Desktop')
$shortcuts = @{
'Tinkercad Circuits.url' = '[InternetShortcut]`nURL=https://www.tinkercad.com/circuits'
'Wokwi Simulator.url' = '[InternetShortcut]`nURL=https://wokwi.com/'
'MakeCode Arcade.url' = '[InternetShortcut]`nURL=https://arcade.makecode.com/'
}
foreach ($file in $shortcuts.Keys) {
$shortcuts[$file] | Out-File -FilePath (Join-Path $desktop $file) -Encoding ASCII
}
# 4. Enable Night Light via Registry (Schedule for All Day)
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.bluelightreductionstate" -Force | Out-Null
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.bluelightreductionstate" -Name "Data" -Value ([System.Convert]::FromBase64String("AQAAAAAAAAAA"))
# 5. Disable Background Apps
Get-AppxPackage | Where-Object { $_.IsFramework -eq $false } | ForEach-Object {
Try { Remove-AppxPackage -Package $_.PackageFullName -ErrorAction SilentlyContinue } Catch {}
}
# 6. Optional: Set Up Family Safety Reminder
Write-Host "Reminder: Set up Microsoft Family Safety at https://account.microsoft.com/family/"
Write-Host "Setup Complete! Reboot recommended to apply Night Light settings."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment