War es hilfreich?

Frage

How to start a windows service using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

To start a specific windows service, you need to use Start-Service command.

Example

Start-Service -Name Spooler

Above command, will start the service name spooler. To check if service is started, use Get-Service –Name Spooler command.

Output

Status Name DisplayName
------ ---- -----------
Running spooler Print Spooler

This command will not show the command progress. To check the command progress, use –Verbose parameter.

PS C:\> Start-Service -Name Spooler -Verbose
VERBOSE: Performing the operation "Start-Service" on target "Print Spooler (Spooler)".

You can also start the service with,

Get-Service -Name Spooler | Start-Service -Verbose
PS C:\> Get-Service -Name Spooler | Start-Service -Verbose
VERBOSE: Performing the operation "Start-Service" on target "Print Spooler (Spooler)".
raja
Published on 22-Jan-2020 14:53:19
Advertisements
War es hilfreich?
Nicht verbunden mit Tutorialspoint
scroll top