Set-SCApplicationDeployment

Modifies an application deployment.

Syntax

Set-SCApplicationDeployment [-ApplicationDeployment] <ApplicationDeployment>
 [-ApplicationPackage <ApplicationPackage>] [-BlockOnChanges <Boolean>] [-CommandParameters <String>]
 [-DACInstanceName <String>] [-EnvironmentVariables <Hashtable>] [-Executable <String>]
 [-FailDeploymentIfDBExists <Boolean>] [-IgnoreDataLoss <Boolean>] [-JobVariable <String>]
 [-LibraryResource <CustomResource>] [-Name <String>] [-PROTipID <Guid>] [-RollbackOnFailure <Boolean>]
 [-RunAsAccount <VMMCredential>] [-RunAsynchronously] [-SQLAuthenticationType <String>]
 [-SQLDeploymentRunAsAccount <VMMCredential>] [-SQLInstanceName <String>]
 [-ScriptCommandSetting <SCScriptCommandSetting>] [-Scriptblock <String>] [-SkipPolicyValidation <Boolean>]
 [-StandardInput <String>] [-TimeoutSeconds <Int32>] [-UninstallMode <String>] [-VMMServer <ServerConnection>]
 [<CommonParameters>]

Description

The Set-SCApplicationDeployment cmdlet modifies an application deployment.

Examples

Example 1: Update the application package for a web application deployment

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -Name "SvcWebDeployment01" -ApplicationProfile $AppProfile 
PS C:\> $AppPackage = Get-SCApplicationPackage -Name "WebApp02.zip"
PS C:\> Set-SCApplicationDeployment -ApplicationDeployment $AppDeployment -ApplicationPackage $AppPackage

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 SvcWebDeployment01 for the application profile stored in $AppProfile, and then stores the object in the $AppDeployment variable.

The third command gets the application package object named WebApp02.zip from the VMM library and stores the object in the $AppPackage variable.

The last command updates the application deployment stored in $AppDeployment by replacing the previous application package with the one stored in $AppPackage.

Parameters

-ApplicationDeployment

Specifies an application deployment object.

Type:ApplicationDeployment
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ApplicationPackage

Specifies an application package object.

Type:ApplicationPackage
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BlockOnChanges

Indicates whether the SQL DAC update is blocked if the database schema is different than that defined in the previous DAC.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CommandParameters

Specifies the parameters for a script or executable program.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DACInstanceName

Specifies the name of a data-tier application (DAC) instance.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnvironmentVariables

Specifies a hashtable that contains the environment variables for the application.

Type:Hashtable
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Executable

Specifies the name of an executable program.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FailDeploymentIfDBExists
Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IgnoreDataLoss

Indicates whether data loss which may occur when updating the SQL Server database is ignored.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LibraryResource

Specifies a resource stored in the Virtual Machine Manager (VMM) library.

Type:CustomResource
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RollbackOnFailure

Rolls back any changes made if the SQL Server database update fails.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

Specifies a Run As account that contains credentials with permission to perform this action.

Type:VMMCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SQLAuthenticationType

Specifies the SQL Server authentication type. The acceptable values for this parameter are:

- SQLServerAuthentication

  • WindowsAuthentication

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SQLDeploymentRunAsAccount

Specifies a Run As account to use to communicate with a SQL Server deployment.

Type:VMMCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SQLInstanceName

Specifies the name of a SQL Server instance.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ScriptCommandSetting

Specifies a script command setting object.

Type:SCScriptCommandSetting
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Scriptblock

Specifies a script block, as a string, for a script application.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SkipPolicyValidation

Indicates whether policy validation against the SQL Server database should occur.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StandardInput

Specifies a path to a file that contains standard input information to use with the script command.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TimeoutSeconds

Specifies the amount of time, in seconds, that a process waits before timing out.

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UninstallMode

Specifies the uninstall mode. The acceptable values for this parameter are:

- MakeUnmanaged

  • DetachDatabase
  • DropDatabase

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

ApplicationDeployment

This cmdlet returns an **ApplicationDeployment** object.