Managing Services

In PowerShell, a number of cmdlets can be used to manage services on a local machine, including the following:

Get-Service—Used to gather service information from Windows

New-Service—Used to create a new service in Windows

Restart-Service—Used to restart services

Resume-Service—Used to resume suspended services

Set-Service—Used to modify service configurations

Start-Service—Used to start services

Stop-Service—Used to stop services

Suspend-Service—Used to suspend services

Getting Service Information

When the Get-Service cmdlet is executed, it returns a collection of objects that contains information about all the services that are present on a Windows system. A representation of that object collection is then ...

Get Windows Server® 2012 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.