Move all RDP connections from one folder to another

Move all RDP connections from one folder to another

avatar

Hello Devolutions Team,

I'm trying to move all my RDP connections inside "folder A" into "folder B" after a check was successful.

Could you help me out?
How do I move RDP connections with PS?

Thanks in advance
BR
Steffen

All Comments (2)

avatar

Hello Steffen,

Just be sure to replace Folder A and Folder B with the full path of these group folders (i.e. "Company X\Folder A").

$sessions = Get-RDMSession

foreach ($sess in $sessions) {

# Test if it is not the Group Folder itself!
if ( $sess.Group -eq "Folder A" -and $sess.Name -ne "Folder A" {

# Test if it is a RDP Connection
if ($sess.ConnectionType -eq "RDPConfigured") {
Set-RDMSessionProperty -ID $sess.ID -Property "Group" -Value "Folder B"
}
}
}
Best regards,

Érica Poirier

avatar

I havent tested this yet.
It ll take a few weeks to give you the feedback.