Hi there,
we are using William Lams Script FoundationCoreAndTiBUsage
from KB 95927
Now I want to see the vCenter on return too I tried it that way:
$tmp = [pscustomobject] @{
VCENTER = $global:DefaultVIServer.Name;
CLUSTER = $clusterName;
VMHOST = $vmhostName;
NUM_CPU_SOCKETS = $sockets;
NUM_CPU_CORES_PER_SOCKET = $coresPerSocket;
FOUNDATION_LICENSE_CORE_COUNT = $vsphereLicenseCount;
VSAN_CORE_COUNT = $coresPerSocket * $sockets;
VSAN_LICENSE_CORE_COUNT = $vsanLicenseCount;
}
But for multiple vcenter connection it only shows the last vcenter in my connected list.
Can anybody help with my problem?
Thank you in advance
Susie
Hi LucD,
thanks for your answer and your hint. They way you wrote it didn't work but I figured it out
VCENTER = ([System.uri](get-cluster $clustername).ExtensionData.Client.ServiceUrl).Host;
I don't know why it didn't work your way, because of my understanding that's almost the same 😁
cheers
Susie
Assuming you did that change in the BuildFoundationUsage function, try with
VCENTER = ([uri]$cluster.ExtensionData.Client.ServiceUrl).Host
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
thanks for your answer and your hint. They way you wrote it didn't work but I figured it out
VCENTER = ([System.uri](get-cluster $clustername).ExtensionData.Client.ServiceUrl).Host;
I don't know why it didn't work your way, because of my understanding that's almost the same 😁
cheers
Susie
Most probably because the $cluster variable didn't contain the cluster object.
The error message should give a hint
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference