Set-SCApplicationDeployment

Modifies an application deployment.

Syntax

Set-SCApplicationDeployment
   [-SQLInstanceName <String>]
   [-SQLDeploymentRunAsAccount <VMMCredential>]
   [-Executable <String>]
   [-CommandParameters <String>]
   [-Scriptblock <String>]
   [-ScriptCommandSetting <SCScriptCommandSetting>]
   [-TimeoutSeconds <Int32>]
   [-StandardInput <String>]
   [-LibraryResource <CustomResource>]
   [-EnvironmentVariables <Hashtable>]
   [-RunAsAccount <VMMCredential>]
   [-VMMServer <ServerConnection>]
   [-ApplicationDeployment] <ApplicationDeployment>
   [-ApplicationPackage <ApplicationPackage>]
   [-Name <String>]
   [-DACInstanceName <String>]
   [-SQLAuthenticationType <String>]
   [-SkipPolicyValidation <Boolean>]
   [-BlockOnChanges <Boolean>]
   [-IgnoreDataLoss <Boolean>]
   [-RollbackOnFailure <Boolean>]
   [-UninstallMode <String>]
   [-FailDeploymentIfDBExists <Boolean>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<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
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ApplicationPackage

Specifies an application package object.

Type:ApplicationPackage
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CommandParameters

Specifies the parameters for a script or executable program.

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

-DACInstanceName

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

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

-EnvironmentVariables

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

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

-Executable

Specifies the name of an executable program.

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

-FailDeploymentIfDBExists

Type:Boolean
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LibraryResource

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

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

-Name

Specifies the name of a VMM object.

Type:String
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RollbackOnFailure

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

Type:Boolean
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scriptblock

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

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

-ScriptCommandSetting

Specifies a script command setting object.

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

-SkipPolicyValidation

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

Type:Boolean
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SQLInstanceName

Specifies the name of a SQL Server instance.

Type:String
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

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

Outputs

ApplicationDeployment

This cmdlet returns an ApplicationDeployment object.