Get the access control list for a file or object.

      Suspend-Service { [-name] string[]
                      | [-displayName] string[]
                      | [-inputObject ServiceController[]] }
                           [-include string[]] [-exclude string[]]
                              [-passthru] [-whatIf]
                                 [-confirm] [CommonParameters]

   -name string
       The service names to be suspended.

   -displayName string
       The display names to be suspended, wildcards are permitted.

   -inputObject ServiceController
       Suspend the services represented by ServiceController.
       Enter a command, expression or variable contains the objects.

   -include string
       Suspend only the specified services. Qualifies the -Name parameter.
       Wildcards , such as "s*" are permitted.

   -exclude string
       Omit the specified services e.g. "*SS64*"
       Qualifies the -Name parameter, Wildcards are permitted.

       Pass the object created by Suspend-Service along the pipeline. 

       Describe what would happen if you executed the command without
       actually executing the command.

       Prompt for confirmation before executing the command.

       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
       -OutBuffer -OutVariable.


Suspend the Telnet service (Tlntsvr) service:

PS C:\> suspend-service -displayname "Telnet"

Use the pipeline operator to pass an object from Get-service to Suspend-service:

PS C:\> get-service schedule | suspend-service

Suspend all services that can be suspended, this is done by selecting only services with a value of "True" for the CanPauseAndContinue property:

PS C:\> get-service | where-object {$_.CanPauseAndContinue -eq "True"} | suspend-service -confirm

“If you've spoken to a non-geek recently, you may have noticed that they have no idea what the difference is between "sleep" and "hibernate” ~ Joel Spolsky

Related PowerShell Cmdlets:

Get-Service - Get a list of services.
New-Service - Create a new service.
- Restart a stopped service.
- Resume a suspended service.
- Make and set changes to the properties of a service.
- Start a stopped service.
- Stop a running service.
Equivalent Windows command: NET START / SC - Service Control.

Copyright © 1999-2020
Some rights reserved