Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Get-SCSQLScriptCommand

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Get-SCSQLScriptCommand

Gets a SQL Server script for an application deployment.

Syntax

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




Detailed Description

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

For more information about Get-SCSQLScriptCommand, type: "Get-Help Get-SCSQLScriptCommand -online".

Parameters

-ApplicationDeployment<ApplicationDeployment>

Specifies an application deployment object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • SQLScriptCommand

Examples

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

The first command gets the application profile object named SvcWebAppProfile01 and 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 (deployment order 1, SQL script type PreInstall) associated with the application deployment stored in $AppDeployment.


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"}

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.