Add-SCApplicationDeployment

Adds an application to an application profile.

Syntax

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

Description

The Add-SCApplicationDeployment cmdlet adds an application to an application profile.

Examples

Example 1: Add a web application to an application deployment

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppPackage = Get-SCApplicationPackage -Name "WebApp01.zip"
PS C:\> $AppDeployment = Add-SCApplicationDeployment -ApplicationProfile $AppProfile -WebDeploy -Name "SvcWebDeployment01" -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 package object named WebApp01.zip from the VMM library and stores the object in the $AppPackage variable.

The last command adds the application package stored in $AppPackage to the application profile stored in $AppProfile, and names the application deployment SvcWebDepAD.

Parameters

-ApplicationPackage

Specifies an application package object.

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

Specifies an application profile object.

Type:ApplicationProfile
Required:True
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 hash table 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

Indicates whether to proceed with deployment if a database with the same name already exists.

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:True
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

Indicates whether to roll back any changes 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. Valid values are:

- SQLServerAuthentication

  • WindowsAuthentication

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

Indicates that the application is a SQL Server data-tier application (DAC).

Type:SwitchParameter
Required:True
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:True
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
-Script

Specifies a VMM script object.

Type:SwitchParameter
Required:True
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. Valid values 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
-WebDeploy

Indicates that the application is a web application.

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

Outputs

ApplicationDeployment

This cmdlet returns an **ApplicationDeployment** object.