編輯

共用方式為


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

PS C:\> Update-ClusterIPResource -Name "Cluster IP Address"
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
Cluster IP Address  Online              Cluster Group       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

PS C:\> Get-ClusterResource | Where-Object -FilterScript {$_.ResourceType.Name -eq "IP Address"} | Update-ClusterIPResource
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
Cluster IP Address  Online              Cluster Group       IP Address 
IP Address 172.2... Online              cluster1-Other      IP Address 
IP Address 172.2... Online              cluster1-FS         IP Address

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

PS C:\> Get-ClusterResource -Name "IP Address 10.24.11.0" | Stop-ClusterResource | Update-ClusterIPResource -Release
Name                State               Group               ResourceType 
----                -----               -----               ------------ 
IP Address 10.2...  Offline             cluster1-Other      IP Address

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