Partager via


Get-SCLoadBalancerTemplate

Gets a load balancer template for a service or computer tier template.

Syntax

Get-SCLoadBalancerTemplate
   [-VMMServer <ServerConnection>]
   -ComputerTierTemplate <ComputerTierTemplate>
   [<CommonParameters>]
Get-SCLoadBalancerTemplate
   [-VMMServer <ServerConnection>]
   -ServiceTemplate <ServiceTemplate>
   [<CommonParameters>]
Get-SCLoadBalancerTemplate
   [-VMMServer <ServerConnection>]
   [-All]
   [<CommonParameters>]
Get-SCLoadBalancerTemplate
   [-VMMServer <ServerConnection>]
   [-ID <Guid>]
   [<CommonParameters>]

Description

The Get-SCLoadBalancerTemplate cmdlet gets the load balancer template for a service template or a computer tier template.

Examples

Example 1: Get the load balancer template for a service template

PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $LoadBalancerTemplate = Get-SCLoadBalancerTemplate -ServiceTemplate $ServiceTemplate
PS C:\> $LoadBalancerTemplate

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

The second command gets the load balancer template for the service template stored in $ServiceTemplate and stores the object in the $LoadBalancerTemplate variable.

The last command displays the properties of the load balancer template stored in $LoadBalancerTemplate to the user.

Example 2: Get the load balancer template for a computer tier template

PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $TierTemplate = Get-SCComputerTierTemplate -ServiceTemplate $ServiceTemplate
PS C:\> $LoadBalancerTemplate = Get-SCLoadBalancerTemplate -ComputerTierTemplate $TierTemplate
PS C:\> $LoadBalancerTemplate

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

The second command gets the computer tier template for the service template stored in $ServiceTemplate and stores the object in the $TierTemplate variable.

The third command gets the load balancer template for the computer tier template stored in $TierTemplate and stores the object in the $LoadBalancerTemplate variable.

The last command displays the properties of the load balancer template stored in $LoadBalancerTemplate to the user.

Parameters

-All

Indicates that this cmdlet gets all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All gets all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.

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

-ComputerTierTemplate

Specifies a computer tier template object.

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

-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

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

-ServiceTemplate

Specifies a service template object.

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

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

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

Outputs

LoadBalancerTemplate

This cmdlet returns a LoadBalancerTemplate object.