Forum / Remote Desktop Manager - PowerShell Repository

remove role not working

  • Create an Issue
  • Cancel

hi
i have this code to remove a role from users in RDM

$user = Get-RDMUser $User
$role = Get-RDMRole -Name $rolename
Remove-RDMRoleToUser -Role $role -User $user


but the role is not removed from the user.

RDM Version 2019.2.19.0
DPS Version 2019.2.12.0

Clock27 days

Hello,

After removing the role, it is important to use the Set-RDMUser cmdlet to save the modification like the following:

$user = Get-RDMUser $User
$role = Get-RDMRole -Name $rolename
Remove-RDMRoleToUser -Role $role -User $user
Set-RDMUser $user

Best regards,



Érica Poirier

signaturesignature

Clock27 days

Thanks for the replay but that did not help, still no change to the user

Clock27 days

Hello,

I think I have found the problem of the Remove-RDMRole cmdlet. The solution I have provided in my previous post properly works with a SQL data source.

Are you using Devolutions Password Server (DPS) as your data source?

I can reproduce your behaviour only on a DPS data source. A ticket has been sent to our engineering department. Once an update will be available, I will keep you posted. For your information, the internal ticket number is RDMW-4415.

Best regards,



Érica Poirier

signaturesignature

Clock26 days