Máte nějaký nápad jak Zapnutí/Vypnutí ochrany v reálném čase dostat do tlačítkové lišty?
Zkoušel jsem to zavoláním dávkového souboru (navíc dost pochybného původu - nerozumím problematice) a výsledek nebyl nijak oslnivý...

Moderator: Hacker
Code: Select all
Set-MpPreference -DisableRealtimeMonitoring $true
Code: Select all
Set-MpPreference -DisableRealtimeMonitoring $false
Code: Select all
@ECHO OFF
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%vypnuti-ochrany.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%PowerShellScriptPath%""' -Verb RunAs}";
Code: Select all
Set-MpPreference -DisableRealtimeMonitoring $true
Code: Select all
@ECHO OFF
SET ThisScriptsDirectory=%~dp0
SET PowerShellScriptPath=%ThisScriptsDirectory%zapnuti-ochrany.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%PowerShellScriptPath%""' -Verb RunAs}";
Code: Select all
Set-MpPreference -DisableRealtimeMonitoring $false
Code: Select all
Add-MpPreference -ExclusionPath "C:\Temp\test.exe"
Code: Select all
Add-MpPreference -ExclusionPath "C:\Temp, "C:\Test"
Code: Select all
Remove-MpPreference -ExclusionPath "C:\Temp\test.exe"
Code: Select all
Add-MpPreference -ExclusionProcess "C:\TotalCmd\totalcmd64.exe", "C:\TotalCmd\totalcmd.exe"
Code: Select all
Remove-MpPreference -ExclusionProcess "C:\TotalCmd\totalcmd64.exe", "C:\TotalCmd\totalcmd.exe"