I need to detect the state of the Exchange VSS Writer service on a given machine. The script will only be executed if Microsoft Exchange 2003, 2007, or 2010 is currently running.
Powershell Script execution is not a viable option, as the client environments may or may not have script execution enabled.
Currently, I capture the output of running this command:
cmd /C "vssadmin list writers | find "Microsoft Exchange Writer" | find "State"
and if the state is set, return true.
This is always return true, because the first find only returns a single line.