PoSh to fix VDA Unregistered

Ran to an interesting issue today where the XenDesktop 7.6 SQL database failed over from one node to the other and caused the VDAs to report “The configured product edition does not support multi-session machines”. We fixed the issue by restarting the “CitrixBrokerService” on the controllers then restarting the “BrokerAgent” service on the VDAs. I put this script together to gather the unregistered/powered on machines and then restart the brokerAgent service on several hundred machines to get them back to a Registered state. I ran this from a PowerShell prompt on the Delivery Controller using my administrative account that had privileges to the VDAs.


Add-PSSnapin citrix.*

Get-BrokerMachine -PowerState On -SummaryState Unregistered | ForEach-Object { Restart-Service -InputObject $(Get-Service -Computer $_.DNSName -Name BrokerAgent)}

I hope this helped, let me know if you have any questions.

-Shane

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.