Check is windows or unix

(imported topic written by SystemAdmin)

when I run (exists wmi) on unix i get below

Q: exists wmi

E: The operator “wmi” is not defined.

when i run (exists dmi) on windows it returns false,

Current Selection Evaluates To:

False

shouldn’t it return false for wmi on unix ?

(imported comment written by BenKus)

This returns an error because unix/linux agents don’t even know what you are talking about when you say “wmi” and they think you have a typo… DMI exists on Windows/Linux/Unix so it doesn’t have the same issue… You can do this to avoid the issue:

if (name of operating system as lowercase contains “win”) then exists wmi else false

Ben