I have been exploring on a windows alternative for following Linux command:
systemctl is-active firewalld
This command only gives us the strings active or inactive as output. So that it becomes helpful in developing various scripts.
I am so far unable to find such command for windows. Could you please help?
Powershell:
$serviceName = "firewalld"
(get-service $serviceName).status
Will return Running/Stopped/Deactivated if a service with the name "firewalld" exists.