Usertype

avatar


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
















All Comments (3)

avatar

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

avatar

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

avatar

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