Solved

Get-service and Get-WmiObject win32_service return very different list of services

Posted on 2013-10-26
2
991 Views
Last Modified: 2013-11-01
When I run the powershell commands on my Exchange Server, Get-service and Get-WmiObject win32_service I get very different lists of services. The Get-WmiObject command only returns 11 services, while the Get-service command returns the long list of services that you see when you open the services applet.

This does not seem to be the case on my domain controller, where both commands return a long list of services.

Why would there be a difference?
0
Comment
Question by:mraineynola
2 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 250 total points
ID: 39603271
Both should show the same results, so this certainly is an error. AFAIK there are no permission issues, but it would be interesting if you get the same or similar reduced set of services with WMI when
a) providing credentials
b) trying from a different PC
c) using a filter excluding some services, like -Filter "Name like 'A%' "
0
 

Author Closing Comment

by:mraineynola
ID: 39617934
I was logged on directly to the server that was giving me the odd results, so I rebooted it after hours and then everything came back correctly. Oh well, that's Windows.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
A brief introduction to what I consider to be the best editor for PowerShell.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question