Skip to content

Commit

Permalink
feat: Added support for multiple clusters in mgmt domain
Browse files Browse the repository at this point in the history
Added support to `PowerManagement-ManagmentDomain.ps1` for more than one cluster in management domain for shut down and start up.

Signed-off-by: Jared Burns <[email protected]>
  • Loading branch information
burnsjared0415 authored and tenthirtyam committed Feb 15, 2024
1 parent 5bcf924 commit 600b5c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SampleScripts/PowerManagement-ManagementDomain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ if ($PsBoundParameters.ContainsKey("shutdown") -or $PsBoundParameters.ContainsKe
Write-PowerManagementLogMessage -Type INFO -Message "Gathering system details from the SDDC Manager inventory. It will take some time."
$workloadDomain = Get-VCFWorkloadDomain | Where-Object { $_.type -eq "MANAGEMENT" }
# Check if we have single cluster in the MGMT domain
$vcfVersion = Get-VCFManager | Select-Object version | Select-String -Pattern '\d+\.\d+' -AllMatches | ForEach-Object { $_.matches.groups[0].value }
if ($workloadDomain.clusters.id.count -gt 1) {
Write-PowerManagementLogMessage -Type ERROR -Message "There are multiple clusters in Management domain. This script supports only a single cluster per domain. Exiting!"
Exit
Expand Down

0 comments on commit 600b5c9

Please sign in to comment.