Skip to content

ClusterIPAddress

dscbot edited this page Jun 19, 2022 · 1 revision

ClusterIPAddress

Parameters

Parameter Attribute DataType Description Allowed Values
IPAddress Key String IP address to add or remove from the Failover Cluster
AddressMask Key String The address mask for the IP address in the format '255.255.255.0'.
Ensure Write String Enforce whether the IP address is present or absent from the Failover Cluster Present, Absent

Description

Used to configure IP addresses for a failover cluster. Ensures that a specific IP address is either present or absent from the cluster.

Requirements

  • Target machine must be running Windows Server 2008 R2 or later.

Examples

Example 1

This example shows how to add two failover over cluster disk resources to the failover cluster.

.NOTES This example assumes the failover cluster is already present.

Configuration ClusterIPAddress_AddClusterIPAddress
{
    Import-DscResource -ModuleName FailoverClusterDsc

    Node localhost
    {
        ClusterIPAddress 'AddClusterIPAddress_192.168.1.25'
        {
            IPAddress   = '192.168.1.25'
            Ensure      = 'Present'
            AddressMask = '255.255.255.0'
        }

        ClusterIPAddress 'AddClusterIPAddress_10.10.10.25'
        {
            IPAddress   = '10.10.10.25'
            Ensure      = 'Present'
            AddressMask = '255.255.0.0'
        }
    }
}

Example 2

This example shows how to add two failover over cluster disk resources to the failover cluster.

.NOTES This example assumes the failover cluster is already present.

Configuration ClusterIPAddress_RemoveClusterIPAddress
{
    Import-DscResource -ModuleName FailoverClusterDsc

    Node localhost
    {
        ClusterIPAddress 'RemoveClusterIPAddress_192.168.1.25'
        {
            IPAddress   = '192.168.1.25'
            Ensure      = 'Absent'
            AddressMask = '255.255.255.0'
        }

        ClusterIPAddress 'RemoveClusterIPAddress_10.10.10.25'
        {
            IPAddress   = '10.10.10.25'
            Ensure      = 'Absent'
            AddressMask = '255.255.0.0'
        }
    }
}