Restart-Service


Restarts a stopped service.

Snap-In: Microsoft.PowerShell.Management

Syntax:

Restart-Service

 [-Name] <String[]> [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm] 

Restart-Service

 [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm] 

Restart-Service

 [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-InputObject <ServiceController[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm] 

Description:

The Restart-service Cmdlet sends a stop message to the service controller t o stop each service, and then a start message to start it again. If the service was already stopped, it will be started without an error indication.



Windows PowerShell. TFM
Internet Forensics
ISBN: 982131445
EAN: 2147483647
Year: 2004
Pages: 289

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net