Forum / Remote Desktop Manager - PowerShell Repository

Usertype

  • Create an Issue
  • Cancel


Hi all,

i like to change the Userproperty from User to Admin.

We try:


$user = Get-RDMUser -Name "XYZ@example.com"
$user | Set-RDMUserProperty -Property "Usertype" -value "Admin"


But this doesn´t work.


How do i set the usertype property?


best regards


Clock2 mths

Hello,

As the UserType property will only accept the values of the enum type, here are the numeric values you should use instead of a word.

Admin = 0
User = 1
Read Only = 2

So, your code should look like this :
$user | Set-RDMUserProperty -Property "Usertype" -value 0

Best regards,



Érica Poirier

signaturesignature

Clock2 mths

Hi Erica,

thank for your reply. We tried but get an error (please see attachment).

This means: Warning: This property can´t be changed.

shot01.png
Clock30 days

Hello,

Which RDM version are you using?

With RDM 2019.1.41, please use this method instead.

$user.UserType = 0
Set-RDMUser $user

Best regards,



Érica Poirier

signaturesignature

Clock29 days