How to get all Windows services when you know the name of the executable

Standard

Long time no blog 🙂

A few days ago I tried to stop a NAS on a NAV 2009 server.

The problem was that I did know which service is running the NAS.

If you are in a similar situation find that there is a powershell cmdlet that can be used to query windows services. The cmdlet name is Get-WmiObject.

In NAV 2009 R2 NAS executable was nassql.exe.

If I want to get all NAS services I would run in a Windows Powershell session the command:

Get-WmiObject Win32_Service | Where-object {$_.pathname -like “*nassql.exe*”}| Format-List -Property Name,Status,PathName

To list all NAV services, replace nassql with Dynamics.NAV.Server.exe.

WMI screenHave fun trouble shooting 🙂