Partilhar via


New-SCLoadBalancerHealthMonitor

Creates a load balancer health monitor object that is used when you create a load balancer virtual IP.

Syntax

Default (Default)

New-SCLoadBalancerHealthMonitor
    [-Name <String>]
    -ProtocolName <String>
    [-Request <String>]
    [-Response <String>]
    -IntervalSeconds <Int32>
    -TimeoutSeconds <Int32>
    [-NumberOfRetries <Int32>]
    [<CommonParameters>]

Description

The New-SCLoadBalancerHealthMonitor cmdlet creates a load balancer health monitor object that is used when you create a load balancer virtual IP.

For information about creating a load balancer virtual IP, type Get-Help New-SCLoadBalancerVIP -Detailed.

Examples

Example 1: Create a load balancer health monitor

PS C:\> $LBHealthMonitor = New-SCLoadBalancerHealthMonitor -Name "HTTPMonitor" -ProtocolName "HTTP" -Request "GET /Index.html HTTP/1.1" -Response 200 -IntervalSeconds 15 -TimeoutSeconds 20

This command creates a load balancer health monitor object named HTTPMonitor and stores the object in the $LBHealthMonitor variable.

Parameters

-IntervalSeconds

Specifies the amount of time, in seconds, that a health monitor waits between sending recurring requests to a load balancer to verify that the load balancer is available. The interval value should be larger than the timeout value.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NumberOfRetries

Specifies the number of times that a load balancer health monitor retries sending a request before marking the VIP member as down.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProtocolName

Specifies the protocol used to communicate with a load balancer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Request

Specifies the request that a health monitor sends to a load balancer. Typically, this command makes an HTTP GET request for the home page of the load balancer and checks for a header response such as 200 OK.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Response

Specifies the expected response to a request that a health monitor sends to a load balancer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSeconds

Specifies the amount of time, in seconds, that a process waits before timing out.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

LoadBalancerHealthMonitor

This cmdlet returns a LoadBalancerHealthMonitor object.