- Create or find a gist that you own.
- Clone your gist (replace
<hash>
with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
<hash>
with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
#------------------------------------------------------------------# | |
#- Clear-WindowsUserCacheFiles # | |
#------------------------------------------------------------------# | |
Function Clear-WindowsUserCacheFiles { | |
param([string]$user=$env:USERNAME) | |
Remove-CacheFiles "C:\Users\$user\AppData\Local\Temp" | |
Remove-CacheFiles "C:\Users\$user\AppData\Local\Microsoft\Windows\WER" | |
Remove-CacheFiles "C:\Users\$user\AppData\Local\Microsoft\Windows\Temporary Internet Files" | |
} |
#------------------------------------------------------------------# | |
#- Clear-GlobalWindowsCache # | |
#------------------------------------------------------------------# | |
Function Clear-GlobalWindowsCache { | |
Remove-CacheFiles 'C:\Windows\Temp' | |
Remove-CacheFiles "C:\`$Recycle.Bin" | |
Remove-CacheFiles "C:\Windows\Prefetch" | |
C:\Windows\System32\rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 255 | |
C:\Windows\System32\rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 4351 | |
} |
WIndows 11 can be installed by hand on the computer by following a few simple steps: source:https://www.reddit.com/r/Windows11/comments/qwneie/a_guide_on_how_to_install_windows_11_manually/ without pictures:
First of all, boot to the installation media.
Then, press Shift + F10
. This will open command prompt.
#################################################################################################### | |
# BOOTSTRAP # | |
#################################################################################################### | |
# Run script as Administrator if the session isn't elevated | |
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")) { | |
$ArgumentList = "-NoExit -NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" | |
Start-Process -FilePath "powershell.exe" -ArgumentList "$ArgumentList" -Verb RunAs | |
Exit | |
} |
#region installs | |
# core tech choco installs | |
$script:chocoCoreTech = @( | |
# 'vscode' # visual studio code | |
# 'python' # python | |
# '7zip' # file archiver with good compression ratio | |
# 'git' # git for windows | |
# 'firefox' # firefox browser | |
) |
Note
All scripts in this document should be executed in Windows Powershell as Administrator.
Write-Host "Downloading and installing latest WinGet app..."; | |
# Find latest version of WinGet | |
$wingetrooturl = "https://github.com/microsoft/winget-cli/releases/"; | |
$wingetpage = "$($env:TEMP)\WinGet.html"; | |
Invoke-WebRequest -Uri $wingetrooturl -OutFile $wingetpage | |
# Locate first msix bundle link | |
[regex]$regex = "<a href=`".*?(download\/v[0-9]+\.[0-9]+\.[0-9]+\/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle)`" rel=`"nofollow`">"; |
# Disable Xbox features | |
Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.XboxIdentityProvider" | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage | |
# Disable Xbox GameDVR | |
reg.exe add "HKCU\Software\Microsoft\GameBar" /v "AllowAutoGameMode" /t REG_DWORD /d "0" /f | |
reg.exe add "HKCU\Software\Microsoft\GameBar" /v "ShowStartupPanel" /t REG_DWORD /d "0" /f |