Set-RDMSession not updating the host property of a server folder

Implemented

Set-RDMSession not updating the host property of a server folder

avatar

I wasn't sure if I should have put this in the bug report forum or here. I'm sure you can move it if it's in the wrong place.

When creating a new server folder, host attribute is correctly set. when updating existing server folder, host attribute does not update.

$sessionTest0 = New-RDMSession -Name "test" -Type "Group" -SetSession


Write-Warning "**********************************************************************"
$sessionTest1 = New-RDMSession -Name "a" -Type "Group"
$sessionTest1.Group = "test\a"
$sessionTest1.GroupDetails.GroupType = "Server"
Set-RDMSession $sessionTest1
Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host


Write-Warning "**********************************************************************"
$sessionTest2 = New-RDMSession -Name "b" -Type "Group"
$sessionTest2.Group = "test\b"
$sessionTest2.GroupDetails.GroupType = "Server"
$sessionTest2.Host = "somehostb.somedomain.com"
Set-RDMSession $sessionTest2
Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host


Write-Warning "**********************************************************************"
$sessionTest3 = Get-RDMSession -Name "a" -Group "test\a"
$sessionTest3.Host = "somehosta.somedomain.com"
Set-RDMSession $sessionTest3
Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host

After the first block:

Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host
---- -----  ----
a    test\a

After the second block:

Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host

Name Group  Host
---- -----  ----
a    test\a
b    test\b somehostb.somedomain.com

After the third block when the host name should have been updated

Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host

Name Group  Host
---- -----  ----
a    test\a
b    test\b somehostb.somedomain.com

All Comments (6)

avatar

Hello,

What RDM PowerShell module version are you using?

Do you get any error when attempting to update the host property?

When trying to update any property of an existing folder, I get this error. Do you have the same behaviour?
WARNING: test\a: A folder with the same name already exists

Best regards,

Érica Poirier

avatar

Technically that warning is not an error. It's just a notification like the line I provided in my code sample with al the asterisks.

Throw "this is an error"
Write-Warning "this is just a notification"


Here's the module Information

Get-Module | where Name -eq "RemoteDesktopManager"

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     2022.1.2.1 RemoteDesktopManager                {Add-RDMPrivateSessionAttachment, Add-RDMRoleRepositoryAcc...



avatar

I started trying earlier module versions and this appears to have worked in 2022.1.1.0

Get-RDMSession | where {$_.Group -like "*test\*"} | Select Name,Group,host

Name Group  Host
---- -----  ----
a    test\a somehosta.somedomain.com
b    test\b somehostb.somedomain.com

Get-Module | where Name -eq "RemoteDesktopManager"

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     2022.1.1.0 RemoteDesktopManager                {Add-RDMPrivateSessionAttachment, Add-RDMRoleRepositoryAcc...

But not after that.

avatar

Hi,

I can confirm this is a bug in the latest release.
We are working on a it and I'll publish a new version as soon as it is fixed.

Regards

Jonathan Lafontaine

avatar

Thanks. No rush. I'm currently using the working module version for now.

avatar

Hi,

The latest release (2022.1.3.0) has a fix for this issue.

Regards

Jonathan Lafontaine