Edit

Share via


Set-DhcpServerv4Failover

Modifies the properties of an existing failover relationship.

Syntax

Default (Default)

Set-DhcpServerv4Failover
    [-ComputerName <String>]
    [-Name] <String>
    [-AutoStateTransition <Boolean>]
    [-MaxClientLeadTime <TimeSpan>]
    [-SharedSecret <String>]
    [-StateSwitchInterval <TimeSpan>]
    [-PartnerDown]
    [-Force]
    [-LoadBalancePercent <UInt32>]
    [-ReservePercent <UInt32>]
    [-PassThru]
    [-Mode <String>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-DhcpServerv4Failover cmdlet modifies the properties of an existing failover relationship.

If the failover mode of relation is load balance or is being changed to load balance, the LoadBalancePercent, MaxClientLeadTime, StateSwitchInterval, AutoStateTransition, and SharedSecret parameters can be specified.

If the failover mode of relation is hot standby or is being changed to hot standby, the ReservePercent, MaxClientLeadTime, StateSwitchInterval, AutoStateTransition, and SharedSecret parameters can be specified.

If the SharedSecret parameter value is $Null, enableauth is set to $False in the data structure. If the SharedSecret parameter is not $Null, enableauth is set to $True in the data structure.

If the SharedSecret parameter is specified, confirmation is sought from the user to transport the shared secret in the clear text on the network.

If you specify the Mode parameter to change the mode of the failover relationship, default confirmation is sought.

Examples

Example 1: Modify parameters of a load balance failover relationship

PS C:\> Set-DhcpServerv4Failover -ComputerName "dhcpserver.contoso.com" -Name "SFO-SIN-Failover" -LoadBalancePercent 70 -MaxClientLeadTime 2:00:00 -AutoStateTransition $True -StateSwitchInterval 2:00:00

This example modifies the parameters of the load balance failover relationship named SFO-SIN-Failover on the computer named dhcpserver.contoso.com as follows: 70% of the client requests will be served by the DHCP server service that runs on the computer named dhcpserver.contoso.com and 30% of the client requests will be served by the DHCP server service that runs on the computer named dhcpserver2.contoso.com. The maximum client lead time for the failover relationship is set to 2 hours. The automatic state transition from the COMMUNICATION INTERRUPTED state to the PARTNER DOWN state is enabled and the timer for automatic state transition is set to 2 hours.

Example 2: Modify parameters of a load balance failover relationship with reserve

PS C:\> Set-DhcpServerv4Failover -ComputerName "dhcpserver.contoso.com" -Name "SFO-SIN-Failover" -ReservePercent 10 -MaxClientLeadTime 2:00:00 -AutoStateTransition $True -StateSwitchInterval 2:00:00

This example modifies the parameters of the hot standby failover relationship named SFO-SIN-Failover on computer named dhcpserver.contoso.com as follows: 10% of the free IP addresses in the scopes will be reserved for the standby DHCP server service. The maximum client lead time for the failover relationship is set to 2 hours. The automatic state transition from the COMMUNICATION INTERRUPTED state to the PARTNER DOWN state is enabled and the timer for automatic state transition is set to 2 hours.

Example 3: Change the mode of a failover relationship

PS C:\> Set-DhcpServerv4Failover -Name "SFO-SIN-Failover" -ComputerName "dhcpserver.contoso.com" -Mode "LoadBalance" -LoadBalancePercent 60

This example changes the mode of the failover relationship SFO-SIN-Failover to LoadBalance. The computer named dhcpserver.contoso.com serves 60 percent of the clients.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Parameter properties

Type:SwitchParameter
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

-AutoStateTransition

Specifies the enabled state for automatic state transition from the COMMUNICATION INTERRUPTED state to the PARTNER DOWN state based on expiration of the timer, by using the StateSwitchInterval parameter, while in the COMMUNICATION INTERRUPTED state. The default value is $False.

This parameter value is $True, if the StateSwitchInterval parameter is specified.

Parameter properties

Type:Boolean
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:True
Value from remaining arguments:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

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

-ComputerName

Specifies the DNS name, or IPv4 or IPv6 address, of the target computer that runs the Dynamic Host Configuration Protocol (DHCP) server service.

Parameter properties

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

Parameter sets

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

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

-Force

Specifies, if the SharedSecret parameter is specified, that user confirmation is required because the SharedSecret parameter value may be transferred in plain text transport for remote management. Specifying this parameter turns off the user confirmation.

Parameter properties

Type:SwitchParameter
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

-LoadBalancePercent

Specifies the percentage of DHCP client requests which should be served by the local DHCP server service or the DHCP server service that runs on the computer specified in the ComputerName parameter. The remaining DHCP client requests would be served by the partner DHCP server service.

Parameter properties

Type:UInt32
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

-MaxClientLeadTime

Specifies the maximum client lead time for the failover relationship.

Parameter properties

Type:TimeSpan
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:True
Value from remaining arguments:False

-Mode

Specifies a mode for the failover relationship. The acceptable values for this parameter are:

  • HotStandby. Changes the mode to hot standby.
  • LoadBalance. Changes the mode to load balance.

Parameter properties

Type:String
Default value:None
Accepted values:LoadBalance, HotStandby
Supports wildcards:False
DontShow:False

Parameter sets

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

-Name

Specifies the name of failover relationship for which the properties are modified.

Parameter properties

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

Parameter sets

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

-PartnerDown

Changes the state of the DHCP server service from COMMUNICATION INTERRUPTED to PARTNER DOWN.

Parameter properties

Type:SwitchParameter
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

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
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

-ReservePercent

Specifies the percentage of the free IPv4 address pool for the scope which should be reserved on the standby DHCP server service.

In the case of a failover, the IPv4 addresses from this reserved pool on the standby DHCP server service will be leased to new DHCP clients.

Parameter properties

Type:UInt32
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

-SharedSecret

Specifies the shared secret to be used for message authentication. To turn off message authentication, set this parameter value to $Null.

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

-StateSwitchInterval

Specifies the time interval for which the DHCP server service should continue to operate in the COMMUNICATION INTERRUPTED state before transitioning to the PARTNER DOWN state.

Parameter properties

Type:TimeSpan
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:True
Value from remaining arguments:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
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.

Inputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Outputs

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.