Last active
March 11, 2025 18:22
-
-
Save iogeek/ad0e7707b4af3329641b431bdca8eae0 to your computer and use it in GitHub Desktop.
setup Windows dev PC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# Copyright (c) 2022 robbieh | |
# See https://mit-license.org/ for details about MIT License | |
# Prep WSL # WSL is getting easier to install. Yah!! | |
wsl --install | |
#dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
#dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# wsl --install -d ubuntu # wsl --instal now defaults to ubuntu (no *nix pref) and WSL2 | |
### Make it mine | |
# Timeout / battery prefs | |
powercfg /Change monitor-timeout-ac 5 | |
powercfg /Change standby-timeout-ac 0 | |
powercfg /Change monitor-timeout-dc 5 | |
powercfg /Change standby-timeout-dc 30 | |
# Hibernate | |
powercfg.exe /hibernate on | |
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSetting" /v ShowHibernateOption /t REG_DWORD /d 1 /f | |
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v ShowHibernateOption /t REG_DWORD /d 1 /f | |
# Mouse | |
reg add "HKCU\Control Panel\Mouse" /v MouseSensitivity /t REG_SZ /d 20 /f | |
reg add "HKCU\Control Panel\Mouse" /v MouseSpeed /t REG_SZ /d 1 /f | |
reg add "HKCU\Control Panel\Mouse" /v MouseTrails /t REG_SZ /d 7 /f | |
# Mouse pointer size to 3 | |
reg add "HKCU\Software\Microsoft\Accessibility" /v CursorSize /t REG_DWORD /d 3 /f | |
# Enable clipboard history | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Clipboard -Name EnableClipboardHistory -Value 1 | |
# Powershell here menu | |
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLinkedConnections /t REG_DWORD /d 00000001 /f | |
reg add HKCR\Directory\shell\powershellmenu /d "Open PowerShell Here" /f | |
reg add HKCR\Directory\shell\powershellmenu\command /d "powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'" /f | |
# Powershell fonts | |
$psList= '%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe', 'HKCU\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe' | |
foreach ($i in $psList) { | |
reg add "HKCU\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe" /v FaceName /t REG_SZ /d "Consolas" /f | |
reg add "HKCU\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe" /v FontFamily /t REG_DWORD /d 54 /f | |
reg add "HKCU\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe" /v FontSize /t REG_DWORD /d 917504 /f | |
reg add "HKCU\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe" /v FontWeight /t REG_DWORD /d 400 /f | |
} | |
## Install Some apps | |
# Using winGet.... Finally. Package install in Windows 11 | |
# winmerge search / winmerge upgrade -h --all | |
$appList= @('git.git', | |
'Microsoft.VisualStudioCode', 'Microsoft.VisualStudio.2022.Community', | |
'ArduinoSA.cli', 'winmerge.winmerge', | |
'StefansTools.grepWin', '7zip.7zip', 'Joplin.Joplin', | |
'TeraTermProject.teraterm' | |
#'Mobatek.MobaXterm' | |
); | |
# interesting packages RaspberryPiFoundation.RaspberryPiImager, zoom.zoom | |
# Mozilla.Firefox, Opera.Opera, Google.Chrome, LibreWolf.LibreWolf | |
# GitHub.cli, GitHub.GitHubDesktop | |
# ArduinoSA.IDE.stable | |
# FastStone.Viewer, Inkscape.Inkscape | |
foreach ($a in $appList) { | |
Write-Host $a | |
winget install --silent --accept-package-agreements --accept-source-agreements $a | |
} | |
# https://mermaid-js.github.io/mermaid | |
# deprecate manually injecting vscode extensions as these all get pickup the cloud / sync is enabled | |
# Code extensions | |
#code --install-extension ms-dotnettools.csharp | |
# keep defender away from known good | |
Add-MpPreference -ExclusionPath D:\ScopePrj, d:\git -Force | |
#Add-MpPreference -ExclusionExtension obj, lib, c, cpp, cs, h, kql, script -Force | |
Add-MpPreference -ExclusionProcess code.exe, devenv.exe -Force | |
# Azure cli | |
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi | |
Write-Host "All done! Now reboot for settings to take!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment