PowerShell cmdlets documentation

PowerShell cmdlets documentation

avatar

Hi there,

It has been a few years that I was playing with RDM Powershell and I see a lot of cool improvements have been made.
However the one thing I still miss is some explanation to the cmdlets that are available.
For example the one thing I was sturgling with is the Set-RDMSessionProperty.
I was using this aproach to change the name of an existing session:

Set-RDMSessionProperty  -ID $Session.ID  -Property "Name" -Value $NewName -Refresh


This will do nothing. The existing session will not change whatsoever.
After some testing I noticed that this does work:

$Session.Name = $NewName
Set-RDMSession -Session $session -Refresh


So now I have no clear understanding of why you would use the Set-RDMSessionProperty cmdlet.
Is there some more comprehensive documentation on the cmdlets?

Cheers!

Sjoerd

All Comments (2)

avatar

Hello,

The Set-RDMSessionProperty is a legacy cmdlet that has been created at the time the RDM was using the PowerShell SnapIn. So this cmdlet could be used for properties that aren't wrapped in the PSConnection object and that we cannot refers to those properties using the '.' like $session.Name.

In fact this cmdlet is available for backward compatibility and is not really useful now as most of the properties can be referenced using the dot.

Let me know if that answers your question.

Best regards,

Érica Poirier

avatar

Hi Erica,

Perfect answer. This tells me I can just ignore this cmdlet and just use the direct notation to manipulate the objects.

Thanks!

Cheers!

Sjoerd