Problem with Powershell New-RDMUser

Implemented

Problem with Powershell New-RDMUser

avatar

Hello,

when i want to create a new RDM User with this powershell script:

Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"

$my_secure_password_string = convertto-securestring "userpassword" -asplaintext -force

$user= New-RDMUser -Login "User" -CreateSQLServerLogin -AuthentificationType "Database" -Email "useraccount@mydomain.com" -Password $my_secure_password_string

i receive the following error message:

New-RDMUser : Cannot retrieve the dynamic parameters for the cmdlet. Object reference not set to an instance of an object.

At C:\Users\JSL_GmbH\Desktop\rdm_new_user.ps1:3 char:8

+ $user= New-RDMUser -Login "User" -CreateSQLServerLogin -Authentificat ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidArgument: ( :) [New-RDMUser], ParameterBindingException

+ FullyQualifiedErrorId : GetDynamicParametersException,RemoteDesktopManager.PowerShellModule.NewRDMUserCommand

datasource is mysql, rdm version 2019.1.38.0 enterprise

can you help with this issue?

Best regards, thanks for your help.

All Comments (12)

avatar

Hello,

Could you please remove the -CreateSQLLogin switch? This switch is no longer used with the latest RDM version.

You could also try without the -AuthenticationType "Database" as with a SQL data source in RDM, it will automatically set the account as Database authentication.

Let me know if this help to resolve your issue.

Best regards,

Érica Poirier

avatar

Hello,

We have been able to reproduce your issue.

I ticket has been sent to our engineering department. The internal ticket number is RDMW-3296. Once a fix will be available, we will update this topic.

Best regards,

Érica Poirier

avatar

Hello,

The following workaround will work to create a new user account on a MySQL data source. You will have to add the Update-RDMUI cmdlet just before the first RDM cmdlet after importing the RDM PowerShell module to update the local cache file.

Import-Module "${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"

Update-RDMUI

$my_secure_password_string = convertto-securestring "userpassword" -asplaintext -force

$user= New-RDMUser -Login "User" -CreateSQLServerLogin -AuthentificationType "Database" -Email "useraccount@mydomain.com" -Password $my_secure_password_string

Best regards,

Érica Poirier

avatar

Good Morning,

thank you for the fast support.

After removing the paramters "CreateSQLServerLogin" and "AuthentificationType" and adding the "Update-RDMUI" cmdlet, i was able to create users.

Best regards

avatar
sredden
Disabled

Using a MSQL Database:

It seems like Set-RDMUser (or New-RDMUser with the -SetUser flag) disassociates from the database. I'm trying to create users using the -IntegratedSecurity and -SkipCreateSQLServerLogin and it complains every single time with a popup that it cannot identify the user.

"Cannot find the login 'domain\user', because it does not exist or you do not have permission."

However, it does successfully create it in the user tab.

I've added a "Update-RDMUI" after each call to Set-RDMUser so work around this annoyance. But a root cause would be nice.

Version 2019.1.38.0 64-bit

.NET Runtime: v4.0.30319

.NET Version: 4.7.2 or better

avatar

Hello,

Could you please send me the command line that creates the user account?

If you're using the same command line I have posted in my previous message, could you please try it with RDM version 2019.1.41?

Best regards,

Érica Poirier