I’m executing a command on a remote Exchange server to determine if anti-virus is enabled under the Transport service, using ansible.windows.win_shell:
$result=(Get-TransportAgent "Malware Agent").Enabled
Is there a simple way to register the True/False result from $result into a variable?
I’ve attempted to use conditional logic within the shell to produce stdout, but that creates some unpleasant parsing problems in my following steps. A simple true/false would help me immeasurably.