What I need: a list of hosts of a specific group/probe via Powershell

With "Get-Device | ft host" I get a list of all hosts and can export them, but I need a list of hosts only of a specific group/probe. Does anyone have an idea?


Article Comments

Hi jostp,

From the sounds of things you may be using PrtgAPI - note that PrtgAPI is a third party product and is not supported by Paessler, as such for any queries regarding PrtgAPI please ask these on the GitHub issues page, rather than the Paessler forums

In order to retrieve devices from specific groups or probes using PrtgAPI, simply retrieve those groups/probes first and then pipe these to `Get-Device`

# Get all devices from the "Servers" group
Get-Group Servers | Get-Device
# Get all devices from all probes whose name contains "london" or "wales"
Get-Probe *london*,*wales* | Get-Device

Regards,

lordmilko


Jun, 2021 - Permalink