Windows Quick Commands

Change the RDP listener port.

① Open the registry and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp.
② Change PortNumber value.

PortNumber

③ After you change the port number, restart the Remote Desktop Services service.
④ Firewall enable the RDP port.

Disable Windows 10/11 Updates.

services.msc -> Windows Updates -> Disabled
gpedit.msc -> Windows Update -> Configure Automatic Updates -> Disabled

Replaces ACLs with default inherited ACLs for all matching files.

ICACLS [dir] /RESET [/T] [/C] [/L] [/Q]

Find which process in using TCP or UDP port and terminate it.

netstat -ano | findstr "7890"
taskkill /T /F /PID 18484

Quick command to access Network Control Panel

ncpa.cpl

Managing user accounts

netplwiz

Windows 11 OOBE without internet connection.

Press Shift + F10, type OOBE\BYPASSNRO, on 25H2 and newer, type start ms-cxh:localonly

System Fix

DISM /Online /Cleanup-image /Checkhealth
DISM /Online /Cleanup-image /Scanhealth
DISM /Online /Cleanup-image /Restorehealth
sfc /scannow

ROBOCOPY

# include empty, retry wait 5s, restartable mode, 32 multi-threaded
ROBOCOPY Z:\source Y:\destination /e /w:5 /z /mt:32

# list only and write output to the log file.
ROBOCOPY Z:\source Y:\destination /e /l /ns /njs /njh /ndl /fp /log:reconcile.txt

# skip same file regardless of whether they're newer, older, or modified.
ROBOCOPY E:\assets\res X:\BaiduNetdisk\assets\res /e /w:5 /z /mt:16 /xc /xn /xo /iorate:2m
ROBOCOPY E:\Customers X:\BaiduNetdisk\SJ_Customers /e /w:5 /z /mt:16 /xc /xn /xo /iorate:1m