Forum / Remote Desktop Manager - PowerShell Repository

Powershell - Create new Entry

  • Create an Issue
  • Cancel

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?

Clock2 yrs

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 = $psArray
Set-RDMSession $ps -Refresh

Best regards,



Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on October 14th 2019.

signaturesignature

Clock2 yrs

Hello,

I just forgot to inform you that this thread has been moved in the PowerShell Repository section.

Best regards,



Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on October 14th 2019.

signaturesignature

Clock2 yrs

Thanks for the sample! smile

Clock2 yrs

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.

Clock2 yrs

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 = $dataEntryConnectionType
Set-RDMSession $session -Refresh

To create a Login (Web) entry, use value Web instead of Credential on the second line.

Best regards,



Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on October 14th 2019.

signaturesignature

Clock2 yrs

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: (smile [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

Why is it read only?

-Markus

Clock4 mths


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

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on October 14th 2019.

signaturesignature

Clock4 mths

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

Clock3 mths


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 = $psArray
Set-RDMSession $ps -Refresh


Best regards,




Érica Poirier

OFFICE CLOSURE!
Although our various support queues will be monitored for emergencies, Devolutions' offices will be closed on October 14th 2019.

signaturesignature

Clock3 mths

Confirmed working!

Thanks a million for the fast fix.

-Markus

Clock3 mths