Reply to Message

View discussion in a popup

Replying to:
jrodsguitar
Enthusiast
Enthusiast

A different approach other than SQL. PowerCLI. If it's helpful this should help you get the IP's of all Horizon machines which you can then use for whatever you need.

You'll need the newest version of PowerCLI and VMWare.HV.Helper module:

PowerCLI-Example-Scripts/Modules/VMware.Hv.Helper at master · vmware/PowerCLI-Example-Scripts · GitH...

You'll need to establish a connection to your vSphere(connect-viserver) environment and Horizon (connect-hvserver) environment first then:

$hvmachines = (Get-HVMachine).base

$machines = $hvmachines.name | foreach {get-vm -name $_}

$machines | foreach{$_.extensiondata} |

select @{Name='Machine';Expression={$_.name}},@{Name='IP';Expression={$_.guest.net.ipaddress}}

Blog: https://powershell.house/
Reply
0 Kudos