Im going to build up a folderstructure that will contains entrys like Password List, Login(Web), Login(Account), Note/SecureNote, Viso-documents.
Some of the entries will have dummy data that we will change later on. For example the password list will have 10 diffrent username
I have searched but have not found out for example how to create passwordlist and add username/password.
Do you have any tips that I can use? For example create the entry like i want it and then how can I check the property/values with powershell?
Hello,
Here is a sample on how you can create a Password List entry type and add credentials in it.
The first step is to create the Password List entry.$ps = New-RDMSession -Name $entryName -Type Credential -Group $group.Group$ps.Credentials.CredentialType = "PasswordList"
Then, add an array of PasswordListItem objects in the Password List entry.$psArray = @()$psEntry = New-Object "Devolutions.RemoteDesktopManager.Business.PasswordListItem"$psEntry.User = $username$psEntry.Password = $passwd$psEntry.Domain = $domain$psEntry.Description = $description$psArray += $psEntry$ps.Credentials.PasswordList = $psArraySet-RDMSession $ps -Refresh
Best regards,
Érica Poirier
Hello,
I just forgot to inform you that this thread has been moved in the PowerShell Repository section.
Best regards,
Érica Poirier
Thanks for the sample! :)
Hi Erica,
Can you also give me sample for creating Login(Account) and Login(Web)?
I can see that the type is Dataentry and I think the difference is DataEntryConnectionType, Credential or Web.
Hello,
Here is a sample script to create a Login (Account).$dataEntryConnectionType = New-Object Devolutions.RemoteDesktopManager.Business.DataEntryConnectionTypeInfo$dataEntryConnectionType.DataEntryConnectionType = [Devolutions.RemoteDesktopManager.DataEntryConnectionType]::Credential$session = New-RDMSession -Name "MyLoginAcount" -Type "DataEntry"$session.DataEntry.ConnectionTypeInfos = $dataEntryConnectionTypeSet-RDMSession $session -Refresh
To create a Login (Web) entry, use value Web instead of Credential on the second line.
Best regards,
Érica Poirier
Hi
Trying to follow the example but hitting a brick wall:
PS C:\Windows\system32> $ps.Credentials.PasswordList = $psArray
'PasswordList' is a ReadOnly property.
At line:1 char:1
+ $ps.Credentials.PasswordList = $psArray
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
Why is it read only?
-Markus
Hello,
It is now read only as we have made some updates internally and it is not possible anymore to create Password List entries using the RDM PowerShell module in RDM 2019.x. Sorry about that.
A ticket has been sent to our engineering department to be able to create Password List entry using PowerShell. Once a fix will be available, I will let you know.
Best regards,
Érica Poirier
Hi
Okay. That's a bit of a hindrance...
I noticed that if i create the connection as a net object, the password list can be set:
$PasswordList=New-Object "Devolutions.RemoteDesktopManager.Business.Connection"
$PasswordList.Credentials.PasswordList = $CredentialArray
Then I can cast it as [RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection]
$psPasswordList=[RemoteDesktopManager.PowerShellModule.PSOutputObject.PSConnection]$PasswordList
But all the needed properties are not set and the object does not work. I'm willing to try a workaround using the .net object if there is one.
-Markus
Hello,
Just to inform you that RDM version 2019.1.39 contains a fix to be able to create and populate a Password List entry type.
Here is a sample you can use. Please note that the Password List Item object has been modified.$ps = New-RDMSession -Name $entryName -Type Credential -Group $group.Group$ps.Credentials.CredentialType = "PasswordList"$psArray = @()$psEntry = New-Object "RemoteDesktopManager.PowerShellModule.PsOutputObject.PSPasswordListItem"$psEntry.User = $username$psEntry.Password = $passwd$psEntry.Domain = $domain$psEntry.Description = $description$psArray += $psEntry$ps.Credentials.PasswordList = $psArraySet-RDMSession $ps -Refresh
Best regards,
Érica Poirier
Confirmed working!
Thanks a million for the fast fix.
-Markus
Hello
I read all the conversation and I confirm the last Erica's script example creates a new passwordlist.
But with 2020.2.14 version (I tried also 2020.2.13) while I'm giving a value to the $psEntry.Password property, it actually does nothing.
In other words, the PasswordList entry is correctly created, with all values set, except for the Password field.
I've tried assigning a normal string and a SecureString, with no luck.
I've also tried by first creating the whole session with Set-RDMSession, and then setting the single PasswordListItem with:
Set-RDMSessionPassword -id ([guid]$psEntry.Id) -Password $pw
but I get: WARNING: Connection not found.
Is there a special way to assign a password to a PasswordList item using PowerShell ?
Hello,
As a Password List entry type contains an array of credentials, you will have to set the password on the right item in that array of credentials.
Here is a sample on how to update the password of the first credential in a Password List entry.
$session = Get-RDMSession -Name "MyPasswordList" $session.Credentials.PasswordList[0].Password = "MyNewPassword" Set-RDMSession $session
Let me know if that helps to modify or assign a password to one of the existing credentials in a Password List entry.
Best regards,
Érica Poirier