đ In this đĒ Windows notes repository, I store all of my notes related to the Windows operating system and Win apps.
đ Some commands may be outdated.
ââ ī¸ This document contains powerful Windows commands - review each carefully before execution, as they may impact your system, and use them at your own risk!
đ Resources đ
Install
Privacy
Debloat Windows 11
Install
Windows 11 without Internet
At the first boot in OOBE (Out-of-the-box experience), select Region and Keyboard layout
On the "Let's connect you to a network" screen, press SHIFT+F10 on the keyboard to open the Command Prompt, type the following command and wait for the reboot.
OOBE\BYPASSNRO
After the reboot, click I don't have internet when asked to connect and Continue with limited setup.
Create a local default Windows 11 account and proceed.
Disable and answer No to all the Privacy Settings if not needed.
â The repositories above contain many useful and powerful scripts. Be sure to review them carefully before applying to your system, and do so at your own risk! â ī¸
Run additional tweaks like Regfiles\Hide_Onedrive_Folder.reg
Backup-System
Optimize-Privacy
Optimize-ServicesRunning
Optimize-TaskScheduler
Optimize-WindowsFeaturesList
Remove-BloatwareAppsList
Install-NerdFont
...
and Software install tool
Removing Telemetry and other unnecessary services
đ The following commands may have already been executed by the scripts above. The command list may be outdated and requires some cleaning and fixing.
Create a UpgradePackages.bat with the following content and run it to upgrade installed packages
@echo off
:: Check for admin rights
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: If error flag set, we do not have admin rights, so prompt for them
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
powershell.exe -Command "Start-Process '%~dpnx0' -Verb RunAs"
exit /B
)
:: Set the execution policy to allow local scripts to run
powershell -NoProfile -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force"
:: Run the winget upgrade command and log the output live
powershell -NoProfile -Command "Start-Transcript -Path UpgradeLog.txt -Force; winget upgrade --all; Stop-Transcript"
:: Indicate completion
echo All packages have been upgraded. Press any key to exit...
pause
cmd Cheatsheet
# System
set
set /?
ver
systeminfo
chkdsk
driverquery
sfc /scannow
shutdown /r
shutdown /a
# Network
ipconfig /all
ping example.com
tracert example.com
nslookup example.com
netstat -abon
netstat -abon | findstr :3389
# Files and Disk
cd
dir
dir /a
dir /s
mkdir dirname
rmdir dirname
type
more
copy
copy *.md
move
del
erase
# Tasks and Processes
tasklist
tasklist /FI "imagename eq notepad.exe"
tasklist /FI "pid eq 1516"
taskkill /PID targetpid
Powershell commands
PS1 Scripts
# 1. Run the script with Bypass mode (One-time execution)
powershell -ExecutionPolicy Bypass -File <SCRIPT.ps1>
# Shorter version
powershell -ep Bypass -f <SCRIPT.ps1>
# 2. Temporarily set execution policy for the current session
Set-ExecutionPolicy Bypass -Scope Process -Force
<SCRIPT.ps1> # Now run the script
# 3. Unblock the script file (if marked as untrusted)
Unblock-File -Path <SCRIPT.ps1>
<SCRIPT.ps1> # Try running again
# 4. Run the script without changing execution policy (using Invoke-Expression)
powershell -Command "Get-Content <SCRIPT.ps1> | Invoke-Expression"
# Alternative (more compact)
iex (Get-Content <SCRIPT.ps1> -Raw)
# 5. Change execution policy permanently (requires admin)
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force # Allows all scripts
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force # Allows only signed remote scripts
# 6. Run with -NoProfile to ignore execution policies
powershell -NoProfile -ExecutionPolicy Bypass -File <SCRIPT.ps1>
# 7. Reset execution policy back to restricted (optional, for security)
Set-ExecutionPolicy Restricted -Scope CurrentUser -Force # Blocks all scripts again
# Upgrade all installed packages to the latest version if available
winget upgrade --all
e.g. Copy tools folder to C:\Program Files\ and rename it to sysinternals
Run vt_setup.msi and install VirusTotalUploader
Copy the API key
Run VirusTotalUploader, paste API key and select Direct file upload
EXTRA: Change the context menu handler by opening regedit.exe and searching for VirusTotalUploader.
It should be in HKEY_CLASSES_ROOT\*\shell
Change the MUIVerb data value, e.g.Upload to VirusTotal.
Now you can right-click any file an select "Upload to VirusTotal" to scan it using VirusTotal
VirusTotal - Free public API
Limits
Request rate
4 lookups / min
Daily quota
500 lookups / day
Monthly quota
15.5 K lookups / month
Troubleshooting
Delete GRUB files from a Boot EFI partition in Windows
Run a cmd.exe process with administrator privileges
Run diskpart
Type: list disk then sel disk X where X is the drive your boot files reside on
Type list vol to see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)
Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
For convenience, assign a drive letter by typing: assign letter=M: where M is a free (unused) drive letter
Type exit to leave disk part
While still in the cmd prompt, type: M: and hit enter, where M was the drive letter you just created.
Type dir to list directories on this mounted EFI partition
If you are in the right place, you should see a directory called EFI
Type cd EFI and then dir to list the child directories inside EFI
Type rmdir /S ubuntu to delete the ubuntu boot directory
## These commands are used to identify and select the hard drive
diskpart
list disk
sel disk 0
## These commands are used to list the partitions, select the Boot EFI partition,
## then assign it a drive letter
list vol
sel vol 2
assign letter=D:
exit
## These commands are used to change into the Boot EFI folder and delete the GRUB folder
cd /d D:
ls
ls EFI
cd EFI
ls
rmdir /s ubuntu
đ This can be done using the latest version to create a bootable USB drive with the preconfigured necessary bypasses and automatic local user creation on the bootable .
đ
Install Windows 11 via
Proceed with the final .
đ Tip: The following settings should be used with a ; otherwise, proceed with caution â ī¸.
đ
đ
đ
đ
đ
Download repo and run Run.bat to configure
Download repo and run other scripts if necessary (I prefer to run them manually)
Install Italian Dev keyboard - - and setup in Time & language - Language & region - Options - Keyboards