2009-08-02 115 views

回答

4

你可能会问了:

Set-Service [service name] -startuptype automatic 

参见:

> get-help set-service 

NAME 
    Set-Service 

SYNOPSIS 
    Starts, stops, and suspends a service, and changes its properties. 


SYNTAX 
    Set-Service [-StartupType {Automatic | Manual | Disabled}] [-DisplayName <string>] [-PassThru] [-Status <string>] [ 
    -InputObject <ServiceController>] [-Description <string>] [-ComputerName <string[]>] [-confirm] [-whatif] [<CommonP 
    arameters>] 

    Set-Service [-Status <string>] [-StartupType {Automatic | Manual | Disabled}] [-Description <string>] [-Name] <stri 
    ng> [-PassThru] [-DisplayName <string>] [-ComputerName <string[]>] [-confirm] [-whatif] [<CommonParameters>] 
+2

它是设置服务stratup模式。但我想,乔治想要在服务崩溃时配置自动重启服务。 – 2009-08-02 13:53:22