How to know if a server is attached to a AVD Host Pool

Occasional Visitor

Hello everyone! 

I'm wondering if there's a way to search through all the AVD host pools in every subscription to see if that server belongs to a host pool and know the host pool name if exist. 

Is there any way to do that using CLI/Cloud Shell? 
I want to make a script that help us to discover this in a quick way. 

Thanks!

1 Reply
My recommendation would be to use Tags on your host pools or virtual machines. This way you can get all the information filtering on relevant tags. Additionally, if you have a naming standard for session host/host pools you should be able to gather the information from there too.