Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » Restart-Service

Restart-Service - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Stops and then starts one or more services.

Restart-Service [-InputObject] <ServiceController[]> [-Exclude <String[]>] [-Force] [-Include <String[]>] [-PassThru] [
Restart-Service [-Exclude <String[]>] [-Force] [-Include <String[]>] [-PassThru] -DisplayName <String[]> [<CommonParame
Restart-Service [-Name] <String[]> [-Exclude <String[]>] [-Force] [-Include <String[]>] [-PassThru] [<CommonParameters>

The Restart-Service cmdlet sends a stop message and then a start message to the Windows Service Controller for a specif
ied service. If a service was already stopped, it is started without notifying you of an error. You can specify the ser
vices by their service names or display names, or you can use the InputObject parameter to pass an object that represen
ts each service that you want to restart.