win10 win11 windows修复系统 排除目录病毒扫描
sfc /scannow
DISM.exe /Online /Cleanup-image /Restorehealth
ps.添加指定目录,不被杀毒删文件:
Add-MpPreference -ExclusionPath "D:\你的代码目录"
2. 检查是否添加成功
执行以下命令,可以查看当前系统里所有已经生效的排除项列表:
PowerShell
Get-MpPreference | Select-Object -Property ExclusionPath
3. 如果需要删除该目录
如果你以后想恢复对这个目录的扫描,只需把命令开头的 Add 改为 Remove 即可:
PowerShell
Remove-MpPreference -ExclusionPath "D:\你的代码目录"
ps.右下角图标不隐藏:
PowerShell 遍历每个应用显示
Get-ChildItem -Path "HKCU:\Control Panel\NotifyIconSettings" | ForEach-Object { Set-ItemProperty -Path $_.PSPath -Name "IsPromoted" -Value 1 -ErrorAction SilentlyContinue }; Stop-Process -Name "explorer" -Force
浙公网安备 33010602011771号