troubleshooting Question

help with powershell script to get conditions of spooler

Avatar of SquigglyMonkey
SquigglyMonkey asked on
PowershellScripting LanguagesActive Directory
2 Comments1 Solution10 ViewsLast Modified:
I wrote a little script to check the status of print spoolers to verify they are all stopped and set to disabled. 
get-adcomputer -filter 'name -like "*"' | 
    foreach {
        get-service -servicename spooler | select *

Open in new window

The output does not contain the system name, can I get a little help to have that included?
Also. I am only interested in servicename, status, StartType (and system name of course).
Name                : spooler
RequiredServices    : {RPCSS, http}
CanPauseAndContinue : False
CanShutdown         : False
CanStop             : False
DisplayName         : Print Spooler
DependentServices   : {}
MachineName         : .
ServiceName         : spooler
ServicesDependedOn  : {RPCSS, http}
ServiceHandle       : SafeServiceHandle
Status              : Stopped
ServiceType         : Win32OwnProcess, InteractiveProcess
StartType           : Disabled
Site                :
Container           :

Open in new window

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros