Skip to content

Latest commit

 

History

History
89 lines (59 loc) · 2.56 KB

Windows.md

File metadata and controls

89 lines (59 loc) · 2.56 KB

Windows

(Because even a Linux user need to play game)

dism /Online /Cleanup-Image /AnalyzeComponentStore
dism /online /Cleanup-Image /StartComponentCleanup
Get-ChildItem -Filter *current* -Recurse | Rename-Item -NewName {$_.name -replace current,old }
  • Turn off the sound popup on Google Chrome

Paste chrome://flags/#hardware-media-key-handling to the browser and turn it off.

  • Check file size recursively

Use TreeSize Free (better) or WinDirStat

vssadmin Resize ShadowStorage /For=C: /On=C: /Maxsize=320MB
vssadmin delete shadows /for=c: /all /quiet
  • Iterate through all subdirectories and format code
Get-ChildItem -Directory | Foreach-Object {dotnet-format -w $_.FullName}
Get-ChildItem -Directory | Foreach-Object {fantomas $_.FullName}
  • Remove items with pattern
Get-ChildItem -Filter "*.txt" -Recurse | Remove-Item

Stable version

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"

Preview version

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Preview"
  • Shrink WSL file:

Use https://github.com/mikemaccana/compact-wsl2-disk or https://superuser.com/a/1734392

powershell -ExecutionPolicy Bypass -File script.ps1
  • Remove wsl volume
wsl.exe --list --verbose
wsl --unregister <NAME>

Open PowerShell as an Administrator and type these commands:

netsh winsock reset 
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns

Reboot your machine.