Add-SCApplicationDeployment
Adds an application to an application profile.
Syntax
Add-SCApplicationDeployment
-SQLDeploymentRunAsAccount <VMMCredential>
[-TimeoutSeconds <Int32>]
[-VMMServer <ServerConnection>]
-ApplicationProfile <ApplicationProfile>
[-ApplicationPackage <ApplicationPackage>]
-Name <String>
[-SQLDac]
[-SQLInstanceName <String>]
[-DACInstanceName <String>]
[-SQLAuthenticationType <String>]
[-SkipPolicyValidation <Boolean>]
[-BlockOnChanges <Boolean>]
[-IgnoreDataLoss <Boolean>]
[-RollbackOnFailure <Boolean>]
[-UninstallMode <String>]
[-FailDeploymentIfDBExists <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Add-SCApplicationDeployment
[-TimeoutSeconds <Int32>]
[-RunAsAccount <VMMCredential>]
[-VMMServer <ServerConnection>]
-ApplicationProfile <ApplicationProfile>
[-ApplicationPackage <ApplicationPackage>]
-Name <String>
[-Script]
[-Executable <String>]
[-CommandParameters <String>]
[-Scriptblock <String>]
[-ScriptCommandSetting <SCScriptCommandSetting>]
[-StandardInput <String>]
[-LibraryResource <CustomResource>]
[-EnvironmentVariables <Hashtable>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Add-SCApplicationDeployment
[-TimeoutSeconds <Int32>]
[-VMMServer <ServerConnection>]
-ApplicationProfile <ApplicationProfile>
[-ApplicationPackage <ApplicationPackage>]
-Name <String>
[-WebDeploy]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ApplicationProfile
Specifies an application profile object.
Type: | ApplicationProfile |
Position: | Named |
Default value: | None |
Required: | True |
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 hash table 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
Indicates whether to proceed with deployment if a database with the same name already exists.
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: | True |
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
Indicates whether to roll back any changes 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 |
-Script
Specifies a VMM script object.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
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. Valid values are:
- SQLServerAuthentication
- WindowsAuthentication
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SQLDac
Indicates that the application is a SQL Server data-tier application (DAC).
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
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: | True |
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. Valid values 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 |
-WebDeploy
Indicates that the application is a web application.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
ApplicationDeployment
This cmdlet returns an ApplicationDeployment object.