When I run Set-RDMSessionPassword for a private session the new password is not used until I click into my private vault. Until then the old password is used. What command do I need to make the new password usable?
Hello,
Could you please try the Set-RDMPrivateSession cmdlet right after Set-RDMSessionPassword?
Best regards,
Érica Poirier
I can't get Set-RDMPrivateSession to work because I am running this from PowerShell 7.
I import the module with this command
Import-Module -UseWindowsPowerShell "C:\Program Files (x86)\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1"
The problem with this is that it changes the object type returned from Get-RDMPrivateSession to Deserialized.RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection and when I try to pass that into Set-RDMPrivateSession I get this error.
Set-RDMPrivateSession: Cannot bind parameter 'Session'. Cannot convert the "RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection" value of type "Deserialized.RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection" to type "RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection".
I was able to get around this problem with the Set-RDMSessionPassword cmdlet since it has an ID parameter, but the Set-RDMPrivateSession cmdlet does not have that parameter.
Hello,
Thank you for your feedback.
I get the same behaviour for any RDM cmdlet that doesn't allow the ID parameter.
Could you please try to use the Update-RDMUI cmdlet to see if that will help?
About the RDM PowerShell module, it's not yet fully supported in PowerShell 7. I have sent a ticket to our engineering department and will keep you posted once an update will be available.
Best regards,
Érica Poirier
I tried Update-RDMUI, and it does not seem to help.
Hello,
Thank you for your feedback.
Sadly, no matter which cmdlet you will try to use, the actual RDM PowerShell module isn't fully compatible with PowerShell 7. Some of the DLLs aren't supported.
The RDM PowerShell Core project is on the road map for later this year but we cannot provide any exact ETA yet. Once an update will be available, we will update this thread.
Thank you for your patience.
Best regards,
Érica Poirier
Hello, I would like some help as well... I am using PS 5.1 with the new Powershell module.
PS C:\temp> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.1645
I am not fully understanding the syntax of how to create a new credential.
The follow script works to update the password if the credential already exists. But we are required to manually create them. I would like to know how to create the credential in time to update the password.
$S = Get-RDMPrivateSession -Name $d # $d is a variable for one of our domains
$SecPw = $dpw | ConvertTo-SecureString -AsPlainText -Force # $dpw is the password
set-RDMSessionPassword -Session $S -Password $SecPw
Set-RDMPrivateSession -Session $S
Update-RDMUI
Hello,
You would first need to create the credential, and then you can use the Set-RDMPrivateSession
Here is a sample:
$S = New-RDMSession -Name "private-cred" -Type "Credential" $SecPw = $dpw | ConvertTo-SecureString -AsPlainText -Force # $dpw is the password set-RDMSessionPassword -Session $S -Password $SecPw Set-RDMPrivateSession -Session $S -refresh
Best regards,
Richard Boisvert
When I create a new credential:
$session = New-RDMSession -Name $d -Type Credential
It does not get created in the private user vault. Rather in the main vault.
Hi,
I tested Richard's little script and it does save in my private vault.
I, however, used Set-RDMPrivateSessionPassword to set the credential password.
Can you post the commands you used to create the new credential?
Regards
Jonathan Lafontaine
$s = New-RDMSession -Name $d.ToLower() -Type "Credential" -Group $folder
Select-String -path $Content -SimpleMatch $d -Context 0,1 | ForEach-Object {$dpw = $_.Context.PostContext}
$SecPw = $dpw | ConvertTo-SecureString -AsPlainText -Force
Set-RDMSessionDomain -Session $s -Domain $d.split("\")[0]
Set-RDMSessionUsername -Session $s -Username $d.split("\")[1]
set-RDMSessionPassword -Session $S -Password $SecPw
Set-RDMPrivateSession -Session $S -Refresh
Hi,
I tested Richard's little script and it does save in my private vault.
I, however, used Set-RDMPrivateSessionPassword to set the credential password.
Can you post the commands you used to create the new credential?
Regards
This creates in my vault not private user vault.
The problem seems to be, that if the credential does not already exist in the private vault, I cannot create it in there through a script.
If it does exist, then I can use get-rdpprivatesession to get the object" and then set-rdmprivatesession ... -refresh to update the record.
So I need a way to create a new record in private vault, where it does not currently exist.
In my above example, the new-rdmsession creates in the vault, not in the private vault.
What data source are you connecting to?
Using your commands, I can successfully create a credential in my private vault on a SQL Server data source.
Jonathan Lafontaine
SQL Server datasource, i am 99% sure, but checking with another team.
Additional info: version 2021.1.44.0, so before the new module.
If you are using RDM 2021.1, you probably should use the module shipped with that version.
The new PowerShell module is designed to work with RDM 2021.2
Jonathan Lafontaine
Agreed.
RDM version: 2021.1.44.0
Module version: difficult to find the version, but the path is:
${env:ProgramFiles(x86)}\Devolutions\Remote Desktop Manager\RemoteDesktopManager.PowerShellModule.psd1
So with this setup, I am not able to create a "New" credential in the private vault. Can someone confirm that on this version, the module has the capability to create "new" user credentials in private vault?
reminder it, works to update an existing credential in private vault, but not create new.
Hi
Unfortunately, this version is out of support.
You'll need to update to the current 2022.1 version and use the PowerShell module from PSGallery.
Regards
Jonathan Lafontaine