


$Collections = $AllRDSServers.CollectionName | Select-Object -Unique $CBRHA = Get-RDConnectionBrokerHighAvailability $AllRDSServers = Get-RDSessionCollection -ConnectionBroker $ActiveCBR | Select-Object -Property collectionname | ForEach-Object -Process $SessionCollection = Get-RDSessionCollection -ConnectionBroker $ActiveCBR $ServersAndRoles = Get-RDServer -ConnectionBroker $ActiveCBR | Select-Object = Get-RDDeploymentGatewa圜onfiguration -ConnectionBroker $ActiveCBR $ActiveCBR = (Get-RDConnectionBrokerHighAvailability -ConnectionBroker $ConnectionBrokerName).ActiveManagementServer At first I get the active Connection Broker, as the other commands need to be ran against this CBR. If you omit this value, the script will ask you for it, as it is a mandatory parameter. You will however need to enter the name of one of your Connection Brokers with the ConnectionBrokerName parameter. $ConnectionBrokerName, $ExportFolder = "C:\temp"ĭefault it’ll export all files to C:\temp, if you want another folder, set the value for the parameter ExportFolder when executing the script. When running the script you’ll need to enter some parameters:

RDGatewa圜onfiguration.csv – Export gateway configuration (gateway mode, gateway fqdn, logon method, use cached credentials, bypass local).RDCBRHA.csv – Export of the Connection Broker High Availability settings (client access name, database connection string, database file path).RDRemoteAppInfo.csv – Export of all remote apps information and their settings (collection name, displayname, foldername, filepath, icon path, user groups, etc).

RDRemoteSessionHostInfo.csv – Export Remote Session Host information (collection name, sessionhost, connections allowed).RDRServersAndRoles.csv – Export of a list of all servers in the farm and their roles (Connection broker, gateway, RD server, web access).In case of the script I’m sharing here, this will create exports to CSV for the different items. I wanted to have a way to document my Remote Dekstop Services environment (Connection broker, Session Host, Gateway, Remote Applications), thus I created a script that does just that.
