Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Set-Service

Set-Service - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Set-Service


Short description
Starts, stops, and suspends a service, and changes its properties.

Syntax
Set-Service [-Name] <string> [-Description <string>] [-DisplayName <string>] [-PassThru] [-StartupType {Automatic |
 Manual | Disabled}] [-Status <string>] [-ComputerName <string[]>] [-Confirm] [-WhatIf] [<CommonParameters>]

Set-Service [-Description <string>] [-DisplayName <string>] [-InputObject <ServiceController>] [-PassThru] [-Startu
pType {Automatic | Manual | Disabled}] [-Status <string>] [-ComputerName <string[]>] [-Confirm] [-WhatIf] [<CommonP
arameters>]

Description
The Set-Service cmdlet changes the properties of a local or remote service, including the status, description, disp
lay name, and start mode. You can use this cmdlet to start, stop, or suspend (pause) a service. To identify the ser
vice, enter its service name or submit a service object, or pipe a service name or service object to Set-Service.