Add-SCApplicationHostTemplate

Adds an application host template to a service template.

Syntax

Add-SCApplicationHostTemplate [-Name] <String> [-AllowUntrustedServerCertificate <Boolean>]
 -ApplicationProfile <ApplicationProfile> [-AuthenticationType <String>] -ComputerName <String>
 [-DeploymentOrder <Int32>] [-Description <String>] [-JobVariable <String>] [-PROTipID <Guid>] [-Port <Int32>]
 -RunAsAccount <VMMCredential> [-RunAsynchronously] -ServiceTemplate <ServiceTemplate>
 [-ServicingOrder <Int32>] -Site <String> [-Tag <String>] [-WebApplicationHost] [<CommonParameters>]

Description

The Add-SCApplicationHostTemplate cmdlet adds an application host template to a service template. An application host template is used to deploy a SQL data-tier application (DAC) on a deployed SQL server or a Web Deploy package to a supported Web Application Host.

Examples

Example 1: Add a SQL application host template to a service template

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> Add-SCApplicationHostTemplate -Name "SQL Application Host" -ComputerName "SQLServer01.Contoso.com" -ApplicationProfile $AppProfile -ServiceTemplate $ServiceTemplate

The first command gets the aplication profile object named SvcWebAppProfile01 and stores the object in the $AppProfile variable.

The second command gets the service temnplate object named ServiceTemplate01 and stores the object in the $ServiceTemplate variable.

The third command adds an application host template to the service template stored in $ServiceTemplate.

Example 2: Add a web application host template to a service template

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "WebAppProfile01"
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $WebRAA = Get-SCRunAsAccount -Name "IIS Site Admin"
PS C:\> $WebAppHostTemplate = Add-SCApplicationHostTemplate -Name "Web Farm" -ServiceTemplate $ServiceTemplate -ApplicationProfile -$AppProfile -ComputerName "@Web Server@" -DeploymentOrder 2 -WebAppHost -Port 8172 -Site "Default Web Site" -AuthenticationType "NTLM" -AllowUntrustedServerCertificate -RunAsAccount $WebRAA

The first command gets the aplication profile object named WebAppProfile01 and stores the object in the $AppProfile variable.

The second command gets the service template object named ServiceTemplate01 and stores the object in the $ServiceTemplate variable.

The third command gets the Run As Account object named IIS Site Admin and stores the object in the $WebRAA variable.

The last command adds a web application host template to the service template stored in $ServiceTemplate (in this case, ServiceTemplate01).

Parameters

-AllowUntrustedServerCertificate

Indicates whether the deployment may proceed when the target deployment server presents an untrusted server certificate. This parameter is used in conjunction with a Web Application host template.

Type:Boolean
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:True (ByValue)
Accept wildcard characters:False
-AuthenticationType

Specifies the authentication mechanism used to facilitate the deployment of web applications associated with the template. This parameter is used in conjunction with a Web Application host template. Valid values are: NTLM and Basic.

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

Specifies the name of a computer that Virtual Machine Manager (VMM) can uniquely identify on your network. Valid formats are:

- FQDN

  • IPv4 or IPv6 address
  • NetBIOS name

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

Specifies the order in which a computer tier, application host, or application is deployed.

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

Specifies a description for the application host template.

Type:String
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
-Name

Specifies the name of a VMM object.

Type:String
Required:True
Position:0
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
-Port

Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.

Type:Int32
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:True
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
-ServiceTemplate

Specifies a service template object.

Type:ServiceTemplate
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServicingOrder

Specifies the order in which a computer tier or application host is serviced.

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

Specifies the web site to which any associated web deploy packages are deployed. This parameter is used in conjunction with a Web Application host template.

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

Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

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

Specifies that the application host template is used for a Web Application Host.

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

Outputs

ApplicationHostTemplate

This cmdlet returns an **ApplicationHostTemplate** object.