Forum / Remote Desktop Manager - PowerShell Repository

Creating folder structure with PS

  • Create an Issue
  • Cancel

Dear fellow RDM'ers,

I'm not very proficient with powershell yet. We have created a new folderstructure for our sessions:

=====Core Infra Services
=======DC01 (RDP Session)
=======DC02 (RDP Session)
=====Database Services
=======DB01 (RDP session)
=======DB02 (Putty session)
=======SW01 (Putty session)
=======SW02 (HTTPS session)
It seems i cannot figure out how to create folders in folders to achive the above structure.
I keep getting error messages like "Padding is invalid and cannot be removed" or "Unexpected token TEST in expression or statement"

Anyone an example script how to create a folder structure?

Thanks in advance.

Clock4 yrs


To create folder structure with the commandlet New-RDMSession, you have to put the folder structure in the Group parameter for each subfolders. The main folder at the root level doesn't need this parameter.

$group = New-RDMSession -Kind "Group" -Name "CustomerA"
Set-RDMSession $group

$group = New-RDMSession -Group "CustomerA" -Kind "Group" -Name "Servers"
Set-RDMSession $group

$group = New-RDMSession -Group "CustomerA\Servers" -Kind "Group" -Name "Core Infra Services"
Set-RDMSession $group

and so on...

Best regards

Érica Poirier


Clock4 yrs