diff --git a/PowerValidatedSolutions.psd1 b/PowerValidatedSolutions.psd1 index fbc52b38..c48eebb8 100644 --- a/PowerValidatedSolutions.psd1 +++ b/PowerValidatedSolutions.psd1 @@ -12,7 +12,7 @@ RootModule = 'PowerValidatedSolutions.psm1' # Version number of this module. - ModuleVersion = '2.7.0.1014' + ModuleVersion = '2.7.0.1015' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/PowerValidatedSolutions.psm1 b/PowerValidatedSolutions.psm1 index 52a28182..c6453a7e 100644 --- a/PowerValidatedSolutions.psm1 +++ b/PowerValidatedSolutions.psm1 @@ -13348,14 +13348,14 @@ Function Add-vCenterGlobalPermission { [Parameter (Mandatory = $true)] [ValidateNotNullOrEmpty()] [String]$role, [Parameter (Mandatory = $true)] [ValidateSet("true", "false")] [String]$propagate, [Parameter (Mandatory = $true)] [ValidateSet("group", "user")] [String]$type, - [Parameter (Mandatory = $false)] [Switch]$localDomain = $false + [Parameter (Mandatory = $false)] [Switch]$localDomain ) Try { - if (!$localDomain){ + if (!$localDomain) { $checkAdAuthentication = Test-ADAuthentication -user $domainBindUser -pass $domainBindPass -server $domain -domain $domain -ErrorAction SilentlyContinue $securePass = ConvertTo-SecureString -String $domainBindPass -AsPlainText -Force - $domainCreds = New-Object System.Management.Automation.PSCredential ($domainBindUser, $securePass) + $domainCreds = New-Object System.Management.Automation.PSCredential ($domainBindUser, $securePass) if (!($checkAdAuthentication[1] -match "Authentication Successful")) { Write-Error "Unable to authenticate to Active Directory with user ($domainBindUser) and password ($domainBindPass), check details: PRE_VALIDTION_FAILED" Return diff --git a/SampleScripts/iam/iamConfigureNsx.ps1 b/SampleScripts/iam/iamConfigureNsx.ps1 index eead3a97..031ef384 100644 --- a/SampleScripts/iam/iamConfigureNsx.ps1 +++ b/SampleScripts/iam/iamConfigureNsx.ps1 @@ -75,8 +75,6 @@ Try { $pvsModulePath = (Get-InstalledModule -Name PowerValidatedSolutions).InstalledLocation $allWorkloadDomains = Get-VCFWorkloadDomain $domainFqdn = $pnpWorkbook.Workbook.Names["region_ad_child_fqdn"].Value - $domainBindUser = $pnpWorkbook.Workbook.Names["child_svc_vsphere_ad_user"].Value - $domainBindPass = $pnpWorkbook.Workbook.Names["child_svc_vsphere_ad_password"].Value $mgmtSddcDomainName = $pnpWorkbook.Workbook.Names["mgmt_sddc_domain"].Value $wldSddcDomainName = $pnpWorkbook.Workbook.Names["wld_sddc_domain"].Value $wsaFqdn = $pnpWorkbook.Workbook.Names["region_wsa_fqdn"].Value