Find Dependent Services

If you would like to check the implications of stopping  a service, you should have a look at its dependent services:

(Get-Service spooler).DependentServices

 

Or use Select-Object:

get-service Spooler | Select-Object -expand DependentServices

 

To stop all dependent services, you can pipe them to Stop-Service:

(Get-Service spooler).DependentServices | Stop-Service -whatif

 

 

Twitter This Tip! ReTweet this Tip!


Posted May 24 2011, 08:00 AM by ps1
Copyright 2012 PowerShell.com. All rights reserved.