The postings on this site are my own and do not represent my Employer's positions, advice or strategies.

LifeAsBob - Blog

 

Home

No Ads ever, except search!
Thursday, November 21, 2024 Login
Public

Blog posts for the month of September,2016.
Use Powershell to rename cluster disks9/1/2016 12:12:04 PM

Always nice to have clustered disks having meaningful names other than "Cluster Disk 1".
Renaming lots of disks by hand is a pain.
In a multi-geographic cluster you may have clustered disks in different geographic locations, making it hard to distinguish by looking at the name what disk is in what data center, so we preface the name with an acronym for each datacenter. Refer to statement above, "Renaming lots of disks by hand is a pain".
Use power shell to automate the process.

Get-ClusterAvailableDisk | ?{$_.Number -eq "2"} | Add-ClusterDisk; start-sleep 05; Get-ClusterResource | ?{$_.ResourceType -eq "Physical Disk" -and $_.Name -like "Cluster*"}| %{$_.Name = "DC1_Backup_01"}

Thanks Vipin !


Blog Home