O'Reilly logo

Windows PowerShell™ Scripting Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting the Service Configuration

To set the service configuration on a server, you need to know which services should be running, whether the services are set to automatic or manual, and whether the services are stopped and disabled. While this information is routinely documented in the Microsoft Resource Kits, TechNet, and various white papers, there is also quite a bit of information you can obtain through Windows PowerShell to help in your decision-making. In the GetSpecificService.ps1 script, you can print the information you receive from Get-Service about a specific service. To do this, first assign the name of the service you are interested in to the variable $strService. Then use the Get-Service cmdlet, specify the -name parameter, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required