Kaseya Community

Trying to Create a Script to add Exclusions to Microsoft Security Esentials

This question is not answered

For Example here is the registry key that im trying to create via script

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths]
"C:\\Program Data\\Microsoft\\Microsoft Antimalware"=dword:00000000

 

I cannot get the set registry value to see it correctly since the key is a file path -- it does all kind of crazy stuff.

All Replies
  • Do it via 'Execute Shell Command' from your script and the Reg command.

    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths" /t REG_DWORD /d 0 /v "C:\Program Files\Kaseya" /f

  • Still a problem, can't edit it with system or admin rights.

    Windows 10 solution, Powershell:

    Add-MpPreference -ExclusionPath "C:\kaseya\curl.exe"

    But still a problem with Windows 7, anyone else got a solution for this?

  • I am noticing that you have double backslashes in your file path.....

  • I wouldn't say that double backslashes is my problem :)