I made the following XML procedure with a Execute Power-shell command:
Powershell works just fine in 9.2
You can pull the KAV Uninstall password from the UI by going to Anti-Virus -> Show -> Machines -> Installation column set -> Side window -> Uninstall password.
But! Try this:
<?xml version="1.0" encoding="UTF-8"?>
-<ScriptExport xmlns="www.kaseya.com/.../Scripting" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
-<Procedure treeFullPath="myProcedures - username" folderId="23762123884155233481182249" id="704545894" treePres="3" name="KAV Uninstall PW Check (64-bit)">
-<Body description="">
-<Statement name="Execute Powershell" continueOnFail="false">
<Parameter name="Parameter1" value="" xsi:type="StringParameter"/>
<Parameter name="Parameter2" value="Get-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\KasperskyLab\protected\KES10*\settings | Select OPEP | Format-Table -HideTableHeaders" xsi:type="StringParameter"/>
<Parameter name="Parameter3" value="True" xsi:type="StringParameter"/>
</Statement>
-<Statement name="SendEmail" continueOnFail="false">
<Parameter name="To" value="#adminDefaults.adminEmail#" xsi:type="StringParameter"/>
<Parameter name="Subject" value="KAV Uninstall PW - #vAgentConfiguration.machName#" xsi:type="StringParameter"/>
<Parameter name="Body" value="Kaspersky Antivirus Uninstall Password for #vAgentConfiguration.Machine_GroupID#: #global:psresult#" xsi:type="MultiLineStringParameter"/>
</Body>
</Procedure>
</ScriptExport>
Thanks for your reply @mcconnell
Unfortunately your procedure is not working it VSA R9.2, however it does work in VSA R9.3.
I am aware of the Installation Column Set in the Anti-Virus module but I wanted to verify the registry value from some of the agents. We are currently experiencing some problems with KAV licenses not getting updated. I read that it might have to do with the OPEP key. (helpdesk.kaseya.com/.../98155367-KAV-License-is-Expired-Due-To-Missing-Uninstall-Password-in-Registry)