File tree 1 file changed +38
-0
lines changed
azure-migrate/SQL Migration
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ <#
2
+ .PERMISSIONS REQUIRED
3
+ Cluster administrator
4
+ .USE CASES
5
+ Run this scripts on any cluster node to update the cluster IPs to the new configuration from the config file path.
6
+ .Parameters
7
+ $configFilePath - path to the configuration file previously created from the cluster
8
+
9
+ . NOTES
10
+ AUTHOR: Microsoft Services
11
+ AUTHOR DATE: 2021-04-23
12
+ .CHANGE LOG
13
+ #>
14
+ param (
15
+ [Parameter (Mandatory = $true )]
16
+ [string ]
17
+ $configFilePath )
18
+ $resourcelist = Import-Csv - Path $configFilePath
19
+
20
+ import-module Failoverclusters
21
+ $Networks = Get-ClusterNetwork
22
+ If ($Networks.Count -gt 1 )
23
+ {
24
+ $ClusterNetworkName = ($Networks | out-gridview - passthru).Name
25
+ }
26
+ else
27
+ {
28
+ $ClusterNetworkName = $Networks.Name
29
+ }
30
+ foreach ($resource in $resourcelist )
31
+ {
32
+ " Configuring $ ( $resource.ResourceName ) with $ ( $resource.NewIP ) IP : $ ( $resource.ProbePort ) on network $ClusterNetworkName ."
33
+ Get-ClusterResource $resource.ResourceName | stop-ClusterResource
34
+ Get-ClusterResource $resource.ResourceName | Set-ClusterParameter - Multiple @ {" Address" = " $ ( $resource.NewIP ) " ;" ProbePort" = $resource.ProbePort ;" SubnetMask" = " 255.255.255.255" ;" Network" = " $ClusterNetworkName " ;" EnableDhcp" = 0 }
35
+ Get-ClusterResource $resource.ResourceName | stop-ClusterResource
36
+ Get-ClusterResource $resource.ResourceName | Set-ClusterParameter - Multiple @ {" Address" = " $ ( $resource.NewIP ) " ;" ProbePort" = $resource.ProbePort ;" SubnetMask" = " 255.255.255.255" ;" Network" = " $ClusterNetworkName " ;" EnableDhcp" = 0 }
37
+ Get-ClusterResource $resource.ResourceName | start-ClusterResource
38
+ }
You can’t perform that action at this time.
0 commit comments