The below will export the keys created by RDP to csv
$exportfile = "C:\temp\RDPhistory.csv"
$RDPhistory = Get-childitem 'HKCU:\SOFTWARE\Microsoft\Terminal Server Client\Servers'
$RDPhistory | Foreach-object {Get-ItemProperty $_.PsPath } | select-object PSChildName | export-csv -path $exportfile -NoTypeInformation