| PowerShell 1.0's Get-Service cmdlet isn't designed to access remote systems. The Get-StoppedAutomaticService script uses the Get-WmiObject cmdlet to work around this limitation and find failed services throughout a network. |
Monitoring critical services is an everyday task for many system administrators, but the large number of services running on systems makes manual inspection tedious. PowerShell's Get-Service cmdlet doesn't yet allow you to examine services remotely, but you can see remote service information with the Get-WmiObject cmdlet. I've written a simple script to automate examining services for startup problems across an entire network. I'll show you how to use the Get-StoppedAutomaticService script, then discuss how it works and why PowerShell's Get-Service cmdlet isn't helpful for this job.
Using Get-StoppedAutomaticService
Listing 1 shows the Get-StoppedAutomaticService script, which you can download by clicking the Download the Code Here button at the top of the page. Here's the abstract form of the command-line usage for the script:
Get-StoppedAutomaticService
[[-ComputerName] ]
[[-Exclude] ]
[-Credential ]
[-Synopsis]
You can get this command-line usage yourself by running the script with the Synopsis parameter as follows: . . .
Dee
deepakm@rice.edu
deetechrice March 03, 2008 (Article Rating: