I am trying to build a kind of self contained system where i copy my application executables in a place and run the services as standalone applications, no installations. I am using NSSM executable to create services in windows server 2012 R2 and on one machine, there are going to be a lot of deployables. My problem is that while automating the deployment with Ansible, i am stuck at the point where i need to know if a given service name already exists and if yes, what is its state ? There don't seem to be any API in NSSM to check that. How can i ask NSSM via command line that if a service exists ? Can i check the existence and status of a service via command line (no powershell) ?