Windows PowerShell in dealing with services to provide a powerful, a lot of convenient, powerful cmdlet waiting for you to discover.
Get-Service, alias gsv, get clients.
Example: gsv eventlog or $ evtlog = gsv eventlog
Start-Service, to start the service.
Stop-Service, stop the service.
Restart-Service, restart the service.
Suspend-Service, Suspend / suspended.
Resume-Service, continue to serve.
Set-Service, set the properties of the service.
New-Service, to create a new service.
Property and method calls services
1, the first access to services
gsv <service name>, service or $ variable name = gsv <service name>
2, call the property
$ Service variable name. Attribute name
3, call the method
$ Service variable name. Method name ()
There is a more simple approach: (gsv <service name>) <attribute name> or <method name> (), such as (gsv w3svc) .stop ().
This is the command summary 56 share of small to give us the cloud using Windows PowerShell operations services, we want to help.