PowerShell ESXi Dashboard


#1

#2

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


#3

Have you tried this @Cragdoo? Work with VMware vCenter connections


#4

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."
      
}


#5

Yeah not sure. Seems like they got it working somehow but I dont actually have any ESXi stuff to test this particular dashboard on.