控制面板 → 用戶賬戶 → 「創建密碼重置磁盤」,使用 USB 而非軟盤。原理:加密存儲當前密碼哈希,遺忘時插入磁盤即可重置。必須在忘記密碼前製作。
SAM\Domains\Account\Users\ 對應鍵值(高風險,最後手段)# 圖形界面操作
lusrmgr.msc → 組 → Administrators → 移除日常帳號
→ Power Users → 添加日常帳號
效果:保留軟件安裝、網絡配置、設備管理等常用權限,移除系統核心修改權限,大幅降低木馬提權風險。
Shift + 右鍵程序 → 「以其他用戶身份運行」 → 輸入管理員憑證。
命令行等效:
runas /user:domain\admin "mmc compmgmt.msc"
runas /savecred /user:admin cmd # 緩存憑證,後續無需輸入密碼
Win+R → netsetup
引導完成:工作組/域加入、文件共享啟用、防火牆例外、網絡發現等最佳實踐配置。
# 查看可用網絡
netsh wlan show networks mode=bssid
# 連接配置文件
netsh wlan connect name="ProfileName"
# 導出/導入配置(含密碼)
netsh wlan export profile folder=.
netsh wlan add profile filename="xxx.xml"
# 創建還原點
Checkpoint-Computer -Description "Pre-Patch Baseline"
# 列出/恢復
Get-ComputerRestorePoint
Restore-Computer -RestorePoint 12
註:僅影響系統文件/註冊表/已安裝程序,不影響用戶數據。
# 查看啟動類型
Get-Service | Where-Object {$_.StartType -eq 'Automatic'}
# 延遲啟動非關鍵服務
Set-Service -Name "DiagTrack" -StartupType AutomaticDelayedStart
# 禁用遙測服務
Set-Service -Name "DiagTrack" -StartupType Disabled
# 篩選關鍵錯誤
Get-WinEvent -LogName System -FilterXPath "*[System/Level=2]" | Select-Object TimeCreated,Id,Message
# 導出離線分析
wevtutil epl System C:\Logs\System.evtx
# 啟用配額
fsutil quota enforce C:
fsutil quota modify C: 10737418240 10737418240 # 10GB 硬限制/軟限制
# 查看使用情況
fsutil quota query C:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumbergpedit.msc → 計算機配置 → Windows 設置 → 安全設置 → 本地策略 → 用戶權利分配 → 「允許通過遠程桌面服務登錄」
# 啟用 WinRM
Enable-PSRemoting -Force
# 受信任主機(工作組環境)
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
# 交互式會話
Enter-PSSession -ComputerName Server01 -Credential (Get-Credential)
# 批量執行
Invoke-Command -ComputerName (Get-Content servers.txt) -ScriptBlock { Get-HotFix | Where-Object HotFixID -eq "KB5001234" }