Import RDP file into Microsoft Remote Desktop Connection Manager 2.7

I’m not aware that you can import separate .rdp files however as .rdp files are readable as text files. A simple powershell script should do the job:

$Path = "C:\Import into RDCMan"
$Text = "full address:s:"
$PathArray = @()
$File = ""
$String = ""
$FinalString = ""

Get-ChildItem $Path -Filter "*.rdp" |
    Where-Object { $_.Attributes -ne "Directory"} |
    ForEach-Object {
        If (Get-Content $_.FullName | Select-String -Pattern $Text) {
            $File = $PathArray += $_.FullName
            $String = Get-Content $File | Where-Object { $_.Contains($Text) }
            $FinalString = $String.substring(15)
    }
}
$FinalString | % {$_} | Out-File "IPs.txt"

Just change the $Path variable to the folder which contains all of your .rdp files. Run the Powershell script and it will create an IPs.txt files ready to import into RDCMan.

P.S. You may need to run this before running the script:

set-executionpolicy remotesigned

Leave a Comment