Restart-Service - wrong service name in code examples - by Shay Levi

Status : 


Sign in
to vote
ID 773500 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 12/5/2012 12:44:05 AM
Access Restriction Public


If you try the code in the first example of the Restart-Service cmdlet you'll get a  "Cannot find any service with service name 'wmi'.", that's because there's no 'wmi' service, the name of the service is 'winmgmt'.

-------------------------- EXAMPLE 1 --------------------------

PS C:\> restart-service wmi

This command restarts the Windows Management Instrumentation (WMI) service on the local computer.
Sign in to post a comment.