How to Check if F-Secure is running via Powershell?

HI!
I am deploying F-Secure using Microsoft Endpoint Manager / Intune and I would like to setup a compliance policy requiring F-Secure not only to be installed but also running correctly (For example with no license issues).
Is there some kind of powershell command I could use to check if F-Secure is running without issues?
I know how to check for the installed files. But I really would like to require it running without issues to be considered "in compliance".
BR Karl @ Qlogic
Accepted Answer
-
Maybe I solved this myself. But I need to do more testing.
I noticed that "Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntivirusProduct" returned a ProductState of 266240, that changed integer if were to turn off real time scanning or remove the product license.
if ((Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntivirusProduct)[0].ProductState -eq 266240) {
$Compliance = @{"FSecureRunning" = $true }
}
else {
$Compliance = @{"FSecureRunning" = $false }
}
return $Compliance | ConvertTo-Json -Compress
1 1Like