Add-SCApplicationDeployment
Add-SCApplicationDeployment
Adds an application to an application profile.
Syntax
Parameter Set: Script
Add-SCApplicationDeployment -ApplicationProfile <ApplicationProfile> -Name <String> -Script [-ApplicationPackage <ApplicationPackage> ] [-CommandParameters <String> ] [-EnvironmentVariables <Hashtable> ] [-Executable <String> ] [-JobVariable <String> ] [-LibraryResource <CustomResource> ] [-PROTipID <Guid]> ] [-RunAsAccount <VMMCredential> ] [-RunAsynchronously] [-Scriptblock <String> ] [-ScriptCommandSetting <SCScriptCommandSetting> ] [-StandardInput <String> ] [-TimeoutSeconds <Int32> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ServerAppV
Add-SCApplicationDeployment -ApplicationProfile <ApplicationProfile> -Name <String> -ServerAppV [-ApplicationPackage <ApplicationPackage> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TimeoutSeconds <Int32> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: SQLDac
Add-SCApplicationDeployment -ApplicationProfile <ApplicationProfile> -Name <String> -SQLDac -SQLDeploymentRunAsAccount <VMMCredential> [-ApplicationPackage <ApplicationPackage> ] [-BlockOnChanges <Boolean]> ] [-DACInstanceName <String> ] [-FailDeploymentIfDBExists <Nullable [System.Boolean]> ] [-IgnoreDataLoss <Boolean]> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RollbackOnFailure <Boolean]> ] [-RunAsynchronously] [-SkipPolicyValidation <Boolean]> ] [-SQLAuthenticationType <String> ] [-SQLInstanceName <String> ] [-TimeoutSeconds <Int32> ] [-UninstallMode <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: WebDeploy
Add-SCApplicationDeployment -ApplicationProfile <ApplicationProfile> -Name <String> -WebDeploy [-ApplicationPackage <ApplicationPackage> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TimeoutSeconds <Int32> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed Description
The Add-SCApplicationDeployment cmdlet adds an application to an application profile.
Parameters
-ApplicationPackage<ApplicationPackage>
Specifies an application package object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ApplicationProfile<ApplicationProfile>
Specifies an application profile object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-BlockOnChanges<Boolean]>
Indicates whether the SQL data-tier application (DAC) update is blocked if the database schema is different than that defined in the previous DAC.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CommandParameters<String>
Specifies the parameters for a script or executable program.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DACInstanceName<String>
Specifies the name of a DAC instance.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EnvironmentVariables<Hashtable>
Specifies a hashtable that contains the environment variables for the application.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Executable<String>
Specifies the name of an executable program.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-FailDeploymentIfDBExists<Nullable [System.Boolean]>
Indicates whether to proceed with deployment if a database with the same name already exists.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-IgnoreDataLoss<Boolean]>
Indicates whether data loss that may occur when updating the SQL Server database is ignored.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-LibraryResource<CustomResource>
Specifies a resource stored in the VMM library.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RollbackOnFailure<Boolean]>
Indicates whether to roll back changes if the SQL Server database update fails.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsAccount<VMMCredential>
Specifies a Run As account that contains credentials with permission to perform this action.
Aliases |
none |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Script
Specifies a VMM script object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Scriptblock<String>
Specifies, as a string, a script block for a script application.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ScriptCommandSetting<SCScriptCommandSetting>
Specifies a script command setting object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServerAppV
Indicates that the application is a virtual application.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SkipPolicyValidation<Boolean]>
Indicates whether policy validation against the SQL Server database should occur.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SQLAuthenticationType<String>
Specifies the SQL Server authentication type. Valid values are:
-- SQLServerAuthentication
-- WindowsAuthentication
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SQLDac
Indicates that the application is a SQL Server DAC.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SQLDeploymentRunAsAccount<VMMCredential>
Specifies a Run As account to use to communicate with a SQL Server deployment.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SQLInstanceName<String>
Specifies the name of a SQL Server instance.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StandardInput<String>
Specifies a path to a file that contains standard input information to use with the script command.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-TimeoutSeconds<Int32>
Specifies the amount of time, in seconds, that a process waits before timing out.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UninstallMode<String>
Specifies the uninstall mode. Valid values are:
-- MakeUnmanaged
-- DetachDatabase
-- DropDatabase
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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 |
-WebDeploy
Indicates that the application is a web application.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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.
- ApplicationDeployment
Examples
Example 1: Add a web application to an application deployment
The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.
The second command gets the application package object named WebApp01.zip from the VMM library, and then 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.
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