see I still get the " [You have modified the global:DefaultVIServer and global:DefaultVIServers system variables. This is not alllowed. Please reset them to $null and reconnect to the vSphere server.]"
errors with this
Have you tried this @Cragdoo? Work with VMware vCenter connections
looking into that , just thought the script in the original post would have come across this and rectified
the script in the post does have
param([PSCredential]$Credentials)
#edit this to change VCenter server address
$Vcenter = "cd-lab-vc1"
$ESXiConnectionTest = Connect-VIServer -server $Vcenter -Credential $Credentials -NotDefault
if ($ESXiConnectionTest.IsConnected -eq 'True')
{
$cache:VCSession = Connect-VIServer -server $Vcenter -Credential $Credentials -NotDefault
New-UDAuthenticationResult -Success -username $Credentials.UserName
}
New-UDAuthenticationResult -ErrorMessage "Your Credentials were not able to authenticate with $VCenter."
}
Yeah not sure. Seems like they got it working somehow but I dont actually have any ESXi stuff to test this particular dashboard on.
I got the same error when I ran the dashboard.ps1 script.
Fixed it by adding
$null = Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -Confirm:$false
as the first line.
Cheers!