Hi guys,
I wonder if you can give me a hand on this property writing… I was asked to generate a report for service status over Windows OS and Linux.
I’ve wrote this and it’s working good so far:
For Windows Status:
if (name of operating system as lowercase contains “win”) then if exists service “.” then State of service “.” else “-Not Installed-”
For Linux Status:
if (name of operating system as lowercase contains “linux”) then (if (exists processes whose (name of it contains “.”)) then (“Running”) else (“Not Running”)) else (“Other OS”)
But now, they want to show the result “Other OS” for (version lower than win2008R2) and Linux RH (version lower than 6.10).
Do you know how to add those values to my properties?
if (windows of operating system and version of operating system >= "8.1" as version) then ( if exists service "." then State of service "." else "-Not Installed-") else ( if (name of operating system as lowercase contains "red hat" and version of operating system >= ("6.10" as version)) then (if (exists processes whose (name of it contains ".")) then ("Running") else ("Not Running")) else ("Other OS"))