Not as graceful as what you are looking for as I don't see a way to autoresolve once rectified but configuring a global variable such as preferred_antivirus as the string you would look for and using something like this could suffice:
This is kind of an expensive query as it pulls products via wmi, but its the only thing I found supported on both server/workstation platforms. Polling root\securitycenter2 isnt available on Servers.
It could also be a little cleaner, but there's something wonky about the way it passes the global variable in.
Log in to comment and vote
Comments2
Pink Rice
Not as graceful as what you are looking for as I don't see a way to autoresolve once rectified but configuring a global variable such as preferred_antivirus as the string you would look for and using something like this could suffice:
https://gist.github.com/axidnt/a58a4b9bffcea718aee3e7ad95709dbd
This is kind of an expensive query as it pulls products via wmi, but its the only thing I found supported on both server/workstation platforms. Polling root\securitycenter2 isnt available on Servers.
It could also be a little cleaner, but there's something wonky about the way it passes the global variable in.