Hello,
how could I get the VIServer object or string of the connection from which I manage a VirtualMachine object? I need the VIServer object/string because I need to create new tags in the specific server where the VM is connected to. In other words, I need to run "New-Tag "lalal" -Server myserver.com" and I have several servers and connections opened.
Thanks!
Christian
Try like this
Get-VM |
Select Name,@{N='vCenter';E={([System.Uri]$_.ExtensionData.Client.ServiceUrl).Host}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-VM |
Select Name,@{N='vCenter';E={([System.Uri]$_.ExtensionData.Client.ServiceUrl).Host}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks this is exactly what I was looking for!