How to collect Verbose RDP logs required for RDP Connection issue?
Provides information on how to collect Verbose RDP logs required for RDP Connection issue troubleshooting.
Logs
- Add the following system variables on the failing machine
WLOG_APPENDER=FILE
WLOG_LEVEL=DEBUG
WLOG_FILEAPPENDER_OUTPUT_FILE_PATH= use a file path where you can find the logs easily.
More information regarding logging capabilities of freerdp here.
UIPATH_SESSION_TIMEOUT = 240 (this way the timeout due to the RDP failure will precede a timeout we enforce)
-
Restart the Robot service. Log will not be generated until you start a FreeRDP session.
-
Open an elevated command and run the uirobot.exe --enablelowlevel
-
Start the schedule
-
Wait until the error appears
-
Stop the schedule
-
Open an elevated command and run the uirobot.exe --disablelowlevel
-
Grab the .etl file created
-
Stop the Robot service
-
Grab the .log file created (Delete the hexadecimal numbers under "Sending Authentication Token" that has hexadecimal numbers, these are confidential data)
-
Note down a timestamp of the occurrence
-
Open EventViewer
-
Click the custom Views Folder
-
In the Actions pane on the right side click Import Custom Views
-
Import the Attached XML (RDP.xml)
-
In the right-side pane click Properties > Edit Filter
-
Add the following filters
USER - The Domain\User of the machine whose credentials are used by the robot
LOGGED - Custom Range. Include previous successful job and at least one failing job
-
Right click the custom view and select Save all events in custom view as...
-
Grab the .evtx file
-
Remove the variables with WLOG to make sure you're not creating a useless large log
- On the affected machine run the following in an elevated PowerShell
gpresult /Scope Computer /v | out-file "\policies.txt" -
Grab the policies.txt file
Attempt a connection using the FreeRDP wrapper
Useful if you can catch the error and attempt to connect exactly after it.
Setup an Orchestrator alarm so you can be notified as soon as it fails via email, if you don't already have one.
- Download the FREERDP.zip from the following drive link - This is the exact implementation built as an executable
- Unzip on a different machine
- Run a CMD and execute wfreerdp.exe /v:MACHINE /u:MACHINE\USER /p:PWD where MACHINE is the host of the attempted RDP session
- Take a screenshot of the RDP console if it errors out. It usually shows the OS error if there is one
Attach the files from points: 8, 10, 19, 21 and screenshots if the optional part was successful