Script
个人常用常见的一些脚本。
powershell
文件批量重命名
Get-ChildItem *.epub | Rename-Item -Newname{ $_.Name -replace ’ - 未知’,’'}
卸除windows内置应用,保留windows商店和AppInstaller
get-appxpackage|where{$.name -notmatch “Store”}|where{$.name -notmatch “Installer”}|remove-appxpackage
恢复微软商店
Get-AppxPackage -AllUsers Microsoft.WindowsStore* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
切换win11右键菜单
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
taskkill /f /im explorer.exe & start explorer.exe
切换win10右键菜单
reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
taskkill /f /im explorer.exe & start explorer.exe
关闭 xbox game bar
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t "REG_DWORD" /d "0" /f
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t "REG_DWORD" /d "0" /f