forked from dsccommunity/FailoverClusterDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2-JoinAdditionalNodeToFailoverCluster.ps1
54 lines (47 loc) · 1.61 KB
/
2-JoinAdditionalNodeToFailoverCluster.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<#
.EXAMPLE
This example shows how to add an additional node to the a failover cluster.
#>
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$ActiveDirectoryAdministratorCredential
)
Import-DscResource -ModuleName xFailOverCluster
Node localhost
{
WindowsFeature AddFailoverFeature
{
Ensure = 'Present'
Name = 'Failover-clustering'
}
WindowsFeature AddRemoteServerAdministrationToolsClusteringPowerShellFeature
{
Ensure = 'Present'
Name = 'RSAT-Clustering-PowerShell'
DependsOn = '[WindowsFeature]AddFailoverFeature'
}
WindowsFeature AddRemoteServerAdministrationToolsClusteringCmdInterfaceFeature
{
Ensure = 'Present'
Name = 'RSAT-Clustering-CmdInterface'
DependsOn = '[WindowsFeature]AddRemoteServerAdministrationToolsClusteringPowerShellFeature'
}
xWaitForCluster WaitForCluster
{
Name = 'Cluster01'
RetryIntervalSec = 10
RetryCount = 60
DependsOn = '[WindowsFeature]AddRemoteServerAdministrationToolsClusteringCmdInterfaceFeature'
}
xCluster JoinSecondNodeToCluster
{
Name = 'Cluster01'
StaticIPAddress = '192.168.100.20/24'
DomainAdministratorCredential = $ActiveDirectoryAdministratorCredential
DependsOn = '[xWaitForCluster]WaitForCluster'
}
}
}