There was one annoying error i got when working with vCenter connections and UD:
You have modified the global:DefaultVIServer and global:DefaultVIServers system variables. This is not allowed.
Please reset them to $null and reconnect to the vSphere server.
This happens because the default settings of PowerCli is to only accept one connection to one vCenter server.
Here is my way to work around that:
Allow multiple vCenter server connections
$null = Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -Confirm:$false
create a scheduled endpoint to first connect to your vCenter servers or check that the cennections is established.
This will save the $global:DefaultVIServer variable to your UD cache. (it contais the SessionSecret you need to reconnect to that connection)
Hi Alex,
I am using your complete demo code as a test to connect to a VM on the local network.
I kept getting the error: âCannot validate argument on parameter âServerâ. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.â I have installed modules: VMware.PowerCLI and Power-NVM but I am still getting the error even after rebooting. I am not a coder or programmer but I am learning as I go. Any help is greatly appreciated. Thanks!
I just checked the functionality with UD 2.3.2. It is working for me.
Here is a version with a little error handling. If it is still not working a screenshot would help us:
Hi Alex,
Big THANKS! I used the recent demo code from your last reply and it actually worked! Is there a way to connect directly to a particular VM server instead of just the vCenterServer? I input the VM server address on line 11 but it still doesnât work. Any suggestion?
Hi! Iâm using your test dashboard with a few tweaks to fit my environment. Its working fine. When I use âPublish-UDDashboardâ, I cannot get it to work. It does run fine if I execute it from Powershell directly.
Do you know what might be happening?
Hi,
I try to get this script work on IIS, but i only get the error: Cannot validate argument on parameter âServerâ. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
Has anybody got the vmware connection working on IIS?
Iâve found the error(s)
1.) Iâve installed the PowerCLI on the server and didnât reboot the server
2.) The module installed globaly under %programfiles% and the appPool user was set to standard. With an appPool User with local admin rights the Module and the dashboard are working!