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 šŸ™‚

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s