This module contains DSC resources for deployment and configuration of Windows Server Failover Cluster
This project has adopted this Code of Conduct.
For each merge to the branch main
a preview release will be
deployed to PowerShell Gallery.
Periodically a release version tag will be pushed which will deploy a
full release to PowerShell Gallery.
Please check out common DSC Community contributing guidelines.
A full list of changes in each version can be found in the change log.
- xCluster Ensures that a group of machines form a cluster.
- xClusterDisk Configures shared disks in a cluster.
- xClusterNetwork Configures as cluster network in a failover cluster.
- xClusterPreferredOwner Configures preferred owner of a cluster group in a cluster.
- xClusterProperty Configures cluster properties on a failover cluster.
- xClusterQuorum Configures quorum in a cluster.
- xWaitForCluster Ensures that a node waits for a remote cluster is created.
Used to configure a failover cluster. If the cluster does not exist, it will be created in the domain and the static IP address will be assigned to the cluster. When the cluster exist (either it was created or already existed), it will add the target node ($env:COMPUTERNAME) to the cluster.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
Name (Key): Name of the failover cluster.[String]
StaticIPAddress (Write): The static IP address of the failover cluster. If this is not specified then the IP address will be assigned from a DHCP.[String[]]
IgnoreNetwork (Write): One or more networks to ignore when creating the cluster. Only networks using Static IP can be ignored, networks that are assigned an IP address through DHCP cannot be ignored, and are added for cluster communication. To remove networks assigned an IP address through DHCP use the resource xClusterNetwork to change the role of the network. This parameter is only used during the creation of the cluster and is not monitored after.[PSCredential]
DomainAdministratorCredential (Write): Credential used to create the failover cluster in Active Directory. If this is not specified then the cluster computer object must have been prestaged as per the documentation.- If
PsDscRunAsCredential
is used, then that account must have been granted Full Control over the Cluster Name Object in Active Directory. - Otherwise the Computer Account must have been granted Full Control over the Cluster Name Object in Active Directory.
- If
- Create first node of a failover cluster
- Join additional node to a failover cluster
- Create failover cluster with two nodes
- Create first node of a failover cluster and ignoring a network subnet
- Create first node of a failover cluster with DHCP
- Join additional node to a failover cluster with DHCP
Configures shared disks in a cluster.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
Number (Key): The disk number of the cluster disk.[String]
Ensure (Write): Define if the cluster disk should be added (Present) or removed (Absent). Default value is 'Present'. { Present | Absent }[String]
Label (Write): The disk label that should be assigned to the disk on the Failover Cluster disk resource.
Configures a cluster network in a failover cluster.
This resource is only able to change properties on cluster networks. To add or remove networks from the cluster, add or remove them from the cluster members. By adding a new subnet on one of the cluster nodes, the network will be added to the cluster, and metadata can be set using the xClusterNetwork module.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
Address (Key): The address for the cluster network in the format '10.0.0.0'.[String]
AddressMask (Key): The address mask for the cluster network in the format '255.255.255.0'.[String]
Name (Write): The name of the cluster network. If the cluster network name is not in desired state it will be renamed to match this name.[String]
Role (Write): The role of the cluster network. If the cluster network role is not in desired state it will changed to match this role. { 0 | 1 | 3 }.[String]
Metric (Write): The metric number for the cluster network. If the cluster network metric number is not in desired state it will be changed to match this metric number.
This parameter sets the role of the cluster network. If the cluster network role is not in desired state it will change to match this role.
The cluster network role can be set to either the value 0, 1 or 3.
0 = Do not allow cluster network communication 1 = Allow cluster network communication only 3 = Allow cluster network communication and client connectivity
See this article for more information about cluster network role values; Configuring Windows Failover Cluster Networks
Configures preferred owners of a cluster group and cluster resources in a failover cluster.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
ClusterGroup (Key): Name of the cluster group.[String]
ClusterName (Key): Name of the cluster.[String[]]
Nodes (Required): The nodes to set as owners.[String[]]
ClusterResources (Write): The resources to set preferred owners on.[String]
Ensure (Write): If the preferred owners should be present or absent. Default value is 'Present'. { Present | Absent }
- Add preferred owners to a cluster group and cluster resources
- Remove preferred owners from a cluster group and cluster resources
Configures cluster properties on a failover cluster.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
Name (Key): Name of the cluster.[UInt32]
AddEvictDelay (Write): Specifies how many seconds after a node is evicted that the failover cluster service will wait before adding a new node.[UInt32]
BlockCacheSize (Write): Controls the size of the Cluster Shared Volume Memory Cache in MB.[UInt32]
ClusterLogLevel (Write): Controls the level of cluster logging.[UInt32]
ClusterLogSize (Write): Controls the maximum size of the cluster log files on each of the nodes.[UInt32]
CrossSiteDelay (Write): Controls the time interval, in milliseconds, that the cluster network driver waits between sending Cluster Service heartbeats across sites.[UInt32]
CrossSiteThreshold (Write): Controls how many Cluster Service heartbeats can be missed across sites before it determines that Cluster Service has stopped responding.[UInt32]
CrossSubnetDelay (Write): Controls the time interval, in milliseconds, that the cluster network driver waits between sending Cluster Service heartbeats across subnets.[UInt32]
CrossSubnetThreshold (Write): Controls how many Cluster Service heartbeats can be missed across subnets before it determines that Cluster Service has stopped responding.[UInt32]
DatabaseReadWriteMode (Write): Specifies the read/write mode for the cluster database.[UInt32]
DefaultNetworkRole (Write): Specifies the role that the cluster automatically assigns to any newly discovered or created network.[String]
Description (Write): Stores administrative comments about the cluster. The following table summarizes the attributes of the Description property.[UInt32]
DrainOnShutdown (Write): Specifies whether to enable Node Drain for a cluster.[UInt32]
DynamicQuorum (Write): Enables the cluster to change the required number of nodes that need to participate in quorum when nodes shut down or crash.[UInt32]
NetftIPSecEnabled (Write): Specifies whether Internet Protocol Security (IPSec) encryption is enabled for inter-node cluster communication.[String]
PreferredSite (Write): Specifies the preferred site for a site-aware cluster.[UInt32]
QuarantineDuration (Write): Specifies the quarantine duration for a node, in seconds.[UInt32]
QuarantineThreshold (Write): Specifies the quarantine threshold for a node, in minutes.[UInt32]
SameSubnetDelay (Write): Controls the delay, in milliseconds, between netft heartbeats.[UInt32]
SameSubnetThreshold (Write): Controls how many heartbeats can be missed on the same subnet before the route is declared as unreachable.[UInt32]
ShutdownTimeoutInMinutes (Write): Specifies how many minutes after a system shutdown is initiated that the failover cluster service will wait for resources to go offline.
Configures quorum in a cluster. For information on how to choose the correct quorum type, please see the article Understanding Quorum Configurations in a Failover Cluster.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
IsSingleInstance (Key): Specifies the resource is a single instance, the value must be 'Yes'.[String]
Type (Write): Quorum type to use. { NodeMajority | NodeAndDiskMajority | NodeAndFileShareMajority | NodeAndCloudMajority, DiskOnly }.[String]
Resource (Write): The name of the disk, file share or Azure storage account resource to use as witness. This parameter is optional if the quorum type is set to NodeMajority.[String]
StorageAccountAccessKey (Write): The access key of the Azure storage account to use as witness. This parameter is required if the quorum type is set to NodeAndCloudMajority. The key is currently not updated if the resource is already set.
- Set quorum to node majority
- Set quorum to node and disk majority
- Set quorum to node and file share majority
- Set quorum to disk only
- Set quorum to node and cloud
Ensures that a node waits for a remote cluster is created.
- Target machine must be running Windows Server 2008 R2 or later.
[String]
Name (Key): Name of the cluster to wait for.[UInt64]
RetryIntervalSec (Write): Interval to check for cluster existence. Default values is 10 seconds.[UInt32]
RetryCount (Write): Maximum number of retries to check for cluster existence. Default value is 50 retries.