Syntax error How to stop the service with the display name in PowerShell?\\n

How to stop the service with the display name in PowerShell?\\n



Similar to -Name parameter, when you add -DisplayName parameter followed by service display name, it will stop service with DisplayName.

Stop-Service -DisplayName 'Print Spooler' -Verbose

OR

Get-Service -DisplayName "Print Spooler" | Stop-Service -Verbose
Updated on: 2020-01-22T10:14:43+05:30

673 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements