Modifier

Partager via


Update-ClusterIPResource

Renews or releases the DHCP lease for an IP address resource in a failover cluster.

Syntax

Update-ClusterIPResource
      [[-Name] <String>]
      [-Renew]
      [-Release]
      [-InputObject <PSObject>]
      [-Cluster <String>]
      [<CommonParameters>]

Description

The Update-ClusterIPResource cmdlet renews or releases the DHCP lease for an IP address resource in a failover cluster. This cmdlet applies only to IP address resources that use DHCP.

Examples

Example 1: Update DHCP lease

Update-ClusterIPResource -Name "Cluster IP Address"

This example updates the DHCP lease for the resource called Cluster IP Address if this resource is DHCP assigned.

Example 2: Update DHCP leases for all clustered IP resources

$clusterIP = Get-ClusterResource | Where-Object {$_.ResourceType.Name -eq "IP Address"}
$clusterIP | Update-ClusterIPResource

This example updates the DHCP lease for all of the clustered IP resources that are DHCP assigned.

Example 3: Take a resource offline and release its lease

$clusterResource = Get-ClusterResource -Name "IP Address 10.24.11.0"
$clusterResource | Stop-ClusterResource | Update-ClusterIPResource -Release

This example takes the resource named IP Address 172.24.11.0 offline, and releases the DHCP lease for that resource.

Parameters

-Cluster

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.

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

-InputObject

Specifies the cluster IP address resource to update.

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

-Name

Specifies the name of the cluster IP address resource to update.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Release

Causes the cmdlet to release the DHCP lease of the IP address resource.

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

-Renew

Causes the cmdlet to renew the DHCP lease of the IP address resource.

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

Inputs

Microsoft.FailoverClusters.PowerShell.ClusterResource

Outputs

Microsoft.FailoverClusters.PowerShell.ClusterResource