다음을 통해 공유


Start-SqlInstance

Starts the specified instance of SQL Server.

구문

ByPath (기본값)

Start-SqlInstance
    [-Credential] <PSCredential>
    [-Path <String[]>]
    [-AutomaticallyAcceptUntrustedCertificates]
    [-ManagementPublicPort <Int32>]
    [-RetryTimeout <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByObject

Start-SqlInstance
    [-Credential] <PSCredential>
    -InputObject <Server[]>
    [-AutomaticallyAcceptUntrustedCertificates]
    [-ManagementPublicPort <Int32>]
    [-RetryTimeout <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByName

Start-SqlInstance
    [-Credential] <PSCredential>
    -ServerInstance <String[]>
    [-AutomaticallyAcceptUntrustedCertificates]
    [-ManagementPublicPort <Int32>]
    [-RetryTimeout <Int32>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Start-SqlInstance cmdlet starts the specified instance of SQL Server.

SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.

This cmdlet supports the following modes of operation:

  • Specify the instance to the Windows PowerShell path.
  • Specify the server object.
  • Specify the ServerInstance object of the target instance of SQL Server.

Note: This cmdlet ceased to work a long time ago. It's been removed in version 22 of the module.

예제

Example 1: Start a SQL Server instance

PS C:\> CD SQLSERVER:\SQL\Computer\Instance
PS SQLSERVER:\SQL\Computer\Instance> Start-SqlInstance -Credential $Credential -AcceptSelfSignedCertificate

The first command changes directory to the path SQLSERVER:\SQL\Computer\Instance.

Example 2: Start all instances of SQL Server on the target computer

PS C:\> Get-SqlInstance -Credential $Credential -MachineName "Computer004" | Start-SqlInstance -Credential $Credential -AcceptSelfSignedCertificate

This command gets all instances of SQL Server on the computer named Computer004 and then starts all the instances. The self-signed certificate of the target machine is automatically accepted without prompting the user.

매개 변수

-AutomaticallyAcceptUntrustedCertificates

Indicates that this cmdlet automatically accepts untrusted certificates.

매개 변수 속성

형식:SwitchParameter
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Confirm

Prompts you for confirmation before running the cmdlet.

매개 변수 속성

형식:SwitchParameter
Default value:False
와일드카드 지원:False
DontShow:False
별칭:cf

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Credential

Specifies a user account with Windows Administrator credentials on the target computer.

매개 변수 속성

형식:PSCredential
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:0
필수:True
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-InputObject

Specifies an array of server objects of the target instance.

매개 변수 속성

형식:

Server[]

Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

ByObject
Position:Named
필수:True
파이프라인의 값:True
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-ManagementPublicPort

Specifies the public management port on the target computer. This parameter is used when the ports of the target computer are not directly accessible but are exposed through endpoints. This means that this cmdlet needs to connect to a different port.

SQL Server Cloud Adapter must be accessible by this port.

매개 변수 속성

형식:Int32
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-Path

Specifies the path to the instance of SQL Server, as a string array, on which this cmdlet runs the operation. If you do not specify a value for this parameter, the cmdlet uses the current working ___location.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

ByPath
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-RetryTimeout

Specifies the time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.

매개 변수 속성

형식:Int32
Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

-ServerInstance

Specifies, as a string array, the name of an instance of SQL Server that becomes the target of the operation.

매개 변수 속성

형식:

String[]

Default value:None
와일드카드 지원:False
DontShow:False

매개 변수 집합

ByName
Position:Named
필수:True
파이프라인의 값:True
속성 이름별 파이프라인의 값:True
나머지 인수의 값:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

매개 변수 속성

형식:SwitchParameter
Default value:False
와일드카드 지원:False
DontShow:False
별칭:wi

매개 변수 집합

(All)
Position:Named
필수:False
파이프라인의 값:False
속성 이름별 파이프라인의 값:False
나머지 인수의 값:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

입력

Microsoft.SqlServer.Management.Smo.Server

System.String