Get-SCSQLScriptCommand

Get-SCSQLScriptCommand

Gets a SQL Server script for an application deployment.

構文

Parameter Set: Default
Get-SCSQLScriptCommand -ApplicationDeployment <ApplicationDeployment> [-VMMServer <ServerConnection> ] [ <CommonParameters>]

詳細説明

The Get-SCSQLScriptCommand cmdlet gets a SQL Server script for an application deployment.

パラメーター

-ApplicationDeployment<ApplicationDeployment>

Specifies an application deployment object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • SQLScriptCommand

Example 1: Get a specified SQL Server script command for an application deployment

The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.

The second command gets the application deployment object named SQLDataTierApp01 for the application profile stored in $AppProfile, and then stores the object in the $AppDeployment variable.

The last command gets the first PreInstall SQL Server script associated with the application deployment stored in $AppDeployment. The first PreInstall SQL Server script has a deployment order 1 and an SQL script type of PreInstall.

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile -Name "SQLDataTierApp01"
PS C:\> Get-SCSQLScriptCommand -ApplicationDeployment $AppDeployment | where {$_.DeploymentOrder -eq "1" -and $_.SQLScriptType -eq "PreInstall"}

関連トピック

Add-SCSQLScriptCommand

Remove-SCSQLScriptCommand

Set-SCSQLScriptCommand

Get-SCApplicationProfile

Get-SCApplicationDeployment