The 2011 Scripting Games Beginner Event 2: Use PowerShell to Identify Services that Will Pause


2011 Scripting Games badge

Summary: Beginner Event 2 of the 2011 Scripting Games uses Windows PowerShell to locate services that will accept a pause command.

About this event



Date of Event

4/5/2011 12:01 AM

Due Date

4/12/2011 12:01 AM

Event scenario

You are a power user who has always enjoyed “tweaking” the performance of your workstation. You are rather careful about what you do, and you always like to have a way to fix the changes you make. You recently became aware of the fact that some services allow you to pause them, and then later unpause them. Unfortunately, so far none of the services you have attempted to pause have accepted the pause command. You then got the bright idea that perhaps you could retrieve this information by using Windows PowerShell. Your script must only report on running services that accept a pause command. The output should display the status of the service, name, and display name of the services that meet the criteria. A sample output is shown in the following image.

Image of command output

Design points
  • The script only needs to run locally, but extra points will be awarded if it runs remotely also
  • Extra points for using a switch to allow selection of other types of information, such as reporting on ALL services (running or stopped) that will accept a pause or continue command

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.

Ed Wilson, Microsoft Scripting Guy