i know i can display the servers with allowed connections on powershell from the session broker by
Get-RDSessionHost -CollectionName "collection" | f1 Sessionhost, NewConnectionAllowed
this will display all the list of hosts within "collection"
SessionHost : Server.domain.local NewConnectionAllowed : Yes
how can i monitor this with a custom script