By | 2020-12-25
  • 清除 PowerShell 历史记录
PS C:\Windows\system32> Remove-Item (Get-PSReadlineOption).HistorySavePath
  • 查看Windows激活状态
#查询密钥
C:\Windows\system32> REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /v BackupProductKeyDefault
#卸载密钥
C:\Windows\system32> slmgr.vbs /upk
#安装密钥
C:\Windows\system32> slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
#查看激活过期时间
C:\Windows\system32> slmgr.vbs -xpr
#查询激活详情
C:\Windows\system32> slmgr.vbs -dlv
  • 查看Office安装ID
C:\Windows\system32> cscript "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /dinstid
  • 隐藏此电脑默认7个文件夹
#隐藏Local Documents(文档)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏Desktop(桌面)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏Local Downloads(下载)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏Local Music(音乐)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏Local Pictures(图片)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏Local Videos(视频)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
#隐藏3D Objects(3D 对象)文件夹
C:\Windows\system32> REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag" /v ThisPCPolicy /t REG_SZ /d Hide
  • 清除Windows安全中心病毒和威胁防护的保护历史记录
#进入存放记录数据文件夹
C:\Windows\system32> cd C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory
#删除此文件夹下所有内容
C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory> RD /S /Q Path
  • 卸载Microsoft Edge浏览器
#进入Installer文件夹
C:\Windows\system32> cd %PROGRAMFILES(X86)%\Microsoft\Edge\Application\8*\Installer
#卸载Microsoft Edge
C:\Windows\system32> setup --uninstall --force-uninstall --system-level