File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2103,11 +2103,11 @@ Function Resolve-PhysicalHostServiceAccounts {
21032103 LogMessage - type INFO - message " [$ ( $hostInstance.name ) ] VCF Service Account Not Found: Creating"
21042104 New-VMHostAccount - Id $svcAccountName - Password $svcAccountPassword - Description " ESXi User" | Out-Null
21052105 New-VIPermission - Entity (Get-Folder root) - Principal $svcAccountName - Role Admin | Out-Null
2106- Disconnect-VIServer $hostInstance.name - confirm:$false | Out-Null
21072106 } else {
21082107 LogMessage - type INFO - message " [$ ( $hostInstance.name ) ] VCF Service Account Found: Setting Password"
21092108 Set-VMHostAccount - UserAccount $svcAccountName - Password $svcAccountPassword | Out-Null
21102109 }
2110+ Disconnect-VIServer $hostInstance.name - confirm:$false | Out-Null
21112111 }
21122112
21132113 Foreach ($hostInstance in $clusterHosts ) {
You can’t perform that action at this time.
0 commit comments