Add-SCApplicationHostTemplate
Add-SCApplicationHostTemplate
Adds an application host template to a service template.
Syntax
Parameter Set: DefaultParamSet
Add-SCApplicationHostTemplate [-Name] <String> -ApplicationProfile <ApplicationProfile> -ComputerName <String> -ServiceTemplate <ServiceTemplate> [-DeploymentOrder <Int32> ] [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicingOrder <Int32> ] [-Tag <String> ] [ <CommonParameters>]
Parameter Set: WebApplicationHost
Add-SCApplicationHostTemplate [-Name] <String> -ApplicationProfile <ApplicationProfile> -ComputerName <String> -RunAsAccount <VMMCredential> -ServiceTemplate <ServiceTemplate> -Site <String> -WebApplicationHost [-AllowUntrustedServerCertificate <Boolean> ] [-AuthenticationType <String> ] [-DeploymentOrder <Int32> ] [-Description <String> ] [-JobVariable <String> ] [-Port <Int32> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicingOrder <Int32> ] [-Tag <String> ] [ <CommonParameters>]
Detailed 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.
Parameters
-AllowUntrustedServerCertificate<Boolean>
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.
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? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-AuthenticationType<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ComputerName<String>
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:
-- FQDN
-- IPv4 or IPv6 address
-- NetBIOS name
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DeploymentOrder<Int32>
Specifies the order in which a computer tier, application host, or application is deployed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Description<String>
Specifies a description for an object.
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 |
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Port<Int32>
Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.
Aliases |
none |
Required? |
false |
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 |
-RunAsAccount<VMMCredential>
Specifies a Run As account that contains credentials with permission to perform this action.
Aliases |
none |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServiceTemplate<ServiceTemplate>
Specifies a service template object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServicingOrder<Int32>
Specifies the order in which a computer tier or application host is serviced.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Site<String>
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Tag<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WebApplicationHost
Indicates that the application host template is used for a Web Application Host.
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.
- ApplicationHostTemplate
Examples
Example 1: Add a SQL application host template to a service template
The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.
The second command gets the service template object named ServiceTemplate01, and then stores the object in the $ServiceTemplate variable.
The third command adds an application host template to the service template stored in $ServiceTemplate.
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
Example 2: Add a web application host template to a service template
The first command gets the application profile object named WebAppProfile01, and then stores the object in the $AppProfile variable.
The second command gets the service template object named ServiceTemplate01, and then stores the object in the $ServiceTemplate variable.
The third command gets the Run As Account object named IIS Site Admin, and then stores the object in the $WebRAA variable.
The last command adds a web application host template to the service template stored in $ServiceTemplate.
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