I manage a RDS remote app environment and wanted to have a way to document this automatically. This way it’s easy to create up-to-date information on all remote apps and also on the servers in the environment, connection broker settings, gateway configuration, collection summary, roles and servers etc.
Based upon Carl Webster’s VMWare documentation script, I decided to create this script.
The script allows for 3 different export types, HTML, Word, PDF. It will document all RDS related settings, like: Gateway configuration, Connection Broker information, Collection information, Roles and services and a list of all (published) applications. It will generate an export like this:
If you use word or PDF as export type, you can also select a cover page, so a report will look a lot nicer (but will also take a lot longer), but you do need MS Word installed on the system you’re running the script on. It might look like this
You can see more examples (html, word and pdf) here (zip file).
If you want to download the script, that can be found here.
If you like this blog post and want to support me so I can create and share more scripts, please consider donating to me through PayPal.
I’m running the script and getting this error below. I don’t see any notes for a path stipulation (unless I’m blind), Where is this path that it empty ? The values are generic in the error, I’ve removed the actual values used. Any help would be apricated. Thank you
PS C:\temp> .\DocumentRDSInfo.ps1 -CN “Company Name” -CP “Mod” -UN “Some Name” -CB rds.domain.com -Folder \\serser\share
Test-Path : Cannot bind argument to parameter ‘Path’ because it is an empty string.
At C:\temp\DocumentRDSInfo.ps1:3083 char:16
+ If(Test-Path “$($Script:FileName1)”)
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.TestP
athCommand
LikeLike
Probably your setting at the folder switch isn’t correct or reachable (maybe you started the script as admin and this account doesn’t have access to this share? Maybe a typo in the location?). If you run the script with -Verbose swtich and your settings, it should show script options when you start the script and there it should specify 2 lines:
Filename1 :
Folder :
Those should show the setting you’ve given when running the script. If still saving to the network location doesn’t work, maybe omit the folder option and check if it can save the document to the current directory?
LikeLike
I have same problem as Johnny MneMonix:
PS C:\temp> .\DocumentRDSInfo.ps1 -Folder c:\temp -ConnectionBrokerName xxx-rds-p-01.xxxxxxx.local -Verbose
VERBOSE: 9/22/2023 12:10:14 PM: Get RDS information
VERBOSE: 9/22/2023 12:10:14 PM: Getting Active Connection broker
VERBOSE: 9/22/2023 12:10:18 PM: Getting RDS servers and roles
VERBOSE: 9/22/2023 12:10:21 PM: Getting RDS gateway configuration
VERBOSE: 9/22/2023 12:10:25 PM: Getting RDS session collection
VERBOSE: 9/22/2023 12:10:39 PM: Getting All RDS servers
VERBOSE: 9/22/2023 12:12:24 PM: Getting RDS Connection Broker High Availability
VERBOSE: 9/22/2023 12:12:28 PM: Getting RDS collections
VERBOSE: 9/22/2023 12:12:28 PM: Getting RDS Remote App information
VERBOSE: 9/22/2023 12:12:28 PM: Working on collection x1
VERBOSE: 9/22/2023 12:12:31 PM: Working on collection x2
WARNING: Unable to convert SID to a valid account name.
SID: S-1-5-21-583907252-1336601894-1606980848-1727
Error: Exception calling “Translate” with “1” argument(s): “Some or all identity references could not be translated.”
VERBOSE: 9/22/2023 12:12:35 PM: Working on collection x3
VERBOSE: 9/22/2023 12:12:39 PM: Working on collection x4
VERBOSE: 9/22/2023 12:12:42 PM: Working on collection x5
WARNING: Unable to convert SID to a valid account name.
SID: S-1-5-21-583907252-1336601894-1606980848-2387
Error: Exception calling “Translate” with “1” argument(s): “Some or all identity references could not be translated.”
VERBOSE: 9/22/2023 12:12:45 PM: Working on collection x6
VERBOSE: 9/22/2023 12:12:49 PM: Working on collection x7
VERBOSE: 9/22/2023 12:12:52 PM: Working on collection x8
VERBOSE: 9/22/2023 12:12:55 PM: Working on collection x9
VERBOSE: 9/22/2023 12:12:59 PM: Working on collection x10
VERBOSE: 9/22/2023 12:13:02 PM: Working on collection x11
VERBOSE: 9/22/2023 12:13:05 PM: Working on collection x12
VERBOSE: 9/22/2023 12:13:08 PM: Working on collection x13
VERBOSE: 9/22/2023 12:13:12 PM: Working on collection x14
VERBOSE: 9/22/2023 12:13:15 PM: Working on collection x15
VERBOSE: 9/22/2023 12:13:19 PM: Working on collection x16
VERBOSE: 9/22/2023 12:13:22 PM: Working on collection x17
VERBOSE: 9/22/2023 12:13:25 PM: Working on collection x18
VERBOSE: 9/22/2023 12:13:28 PM: Working on collection x19
VERBOSE: 9/22/2023 12:13:32 PM: Working on collection x20
VERBOSE: 9/22/2023 12:13:35 PM: Working on collection x21
VERBOSE: 9/22/2023 12:13:39 PM: Working on collection x22
VERBOSE: 9/22/2023 12:13:42 PM: Working on collection x23
VERBOSE: 9/22/2023 12:13:45 PM: Working on collection x24
VERBOSE: 9/22/2023 12:13:48 PM: Working on collection x25
VERBOSE: 9/22/2023 12:13:51 PM: Working on collection x26
VERBOSE: 9/22/2023 12:13:54 PM: Working on collection x27
VERBOSE: 9/22/2023 12:13:58 PM: Working on collection x28
VERBOSE: 9/22/2023 12:14:01 PM: Working on collection x29
VERBOSE: 9/22/2023 12:14:05 PM: Finished Get RDS information
VERBOSE: 9/22/2023 12:14:05 PM:
VERBOSE: 9/22/2023 12:14:05 PM: Processing Summary page
VERBOSE: 9/22/2023 12:14:05 PM: Processing Collection Summary
Test-Path : Cannot bind argument to parameter ‘Path’ because it is an empty string.
At C:\temp\DocumentRDSInfo.ps1:3083 char:16
+ If(Test-Path “$($Script:FileName1)”)
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Test-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
PathCommand
VERBOSE: 9/22/2023 12:14:05 PM: Script has completed
VERBOSE: 9/22/2023 12:14:05 PM:
VERBOSE: 9/22/2023 12:14:05 PM: Script started: 09/22/2023 12:10:14
VERBOSE: 9/22/2023 12:14:05 PM: Script ended: 9/22/2023 12:14:05 PM
VERBOSE: 9/22/2023 12:14:05 PM: Elapsed time: 0 days, 0 hours, 3 minutes, 50.317 seconds
LikeLike
Did you enter a valid path for the document to be saved to? Do you have access to the path? If it’s a UNC path, try a local path (other than the root of C, or a C:\windows subfolder, or the C:\program files folder or a subfolder, since these all have special permissions). The error given is that the path is invalid, so either you don’t have access rights to the path used, or you’ve entered an invalid path/filename.
LikeLike