PowerShell: Open-RDMSession uncomfortable and slow

PowerShell: Open-RDMSession uncomfortable and slow

0 vote

avatar

Hi,

experimenting with Open-RDMSession function, I learned, that it's not possible to pass on several IDs at once, like:

Open-RDMSession -ID b3055e30-841b-49e6-a244-02ab117f41ee, 0eccccf2-2ba8-4fe4-b5bb-41f4099d736b, 7ff666a9-f566-413b-a05f-fe9e093ce5c0

So, if I want to open several sessions, I need to call the function several times. Doing this, I found that, if called three times without pause, only the first one is opened. I had to also add a two second pause to get all three sessions opened. Example:

Get-VMWareVM | where Notes -Match Trusted | ForEach-Object { $ses = Get-RDMSession -Name $_.Name; Open-RDMSession -ID $ses.ID }

This doesn't work. Only the first session is opened, the next two are "lost"...

Get-VMWareVM | where Notes -Match Trusted | ForEach-Object { $ses = Get-RDMSession -Name $_.Name; Open-RDMSession -ID $ses.ID; Start-Sleep -Seconds 2 }

This does work, but is slow bacause of the necessary 2 seconds sleep.

I suggest to improve the function, so it (ideally) accepts a list of IDs. Also, it should work asynchronously. I.e. create processes to open each session, so the function call is fast regardless of how long actually opening a session takes.

All Comments (1)

avatar

Hi,

We will add to the TODO list the possibility to give to the parameter ID a list of session IDs to open.

Thank you for your feedback.

Best regards,

Olivier Désalliers