Extend included fields in an import CSV file

Extend included fields in an import CSV file

avatar

Hi, at the moment it is possibile to import entries from a CSV file with the following fields:

ConnectionType,Name,Group,Description,Expiration,Host,CredentialUserName,CredentialDomain,CredentialPassword

It would be very useful to include other fields in the CSV file.
For example, we have CSV file full of useful informations to use in conjunction with RDM: like "telephone numbers" of customers.
These telephone numbers, if mass-imported to RDM via CSV, can be passed to a command line script as a variable.
For example, a command line like

%comspec% /k "%PROGRAMFILES%\Jitsi\Jitsi.exe" sip:$telephone$

Can make a voip call to contact the customer prior to access his computer.
Did anyone already face the question? Can the developers of RDM insert extra fields to be imported via CSV file?
Thank you
Giuseppe

All Comments (7)

avatar

For the import I would suggest you go the PowerShell route, have a look at this example:

http://forum.devolutions.net/topic2663-import-simple-csv-name-url-of-web-bookmarks.aspx

If you need any assistance let me know.

As for the $telephone$ variable we will need to add it to the supported variable list.

Stéfane Lavergne

avatar

Dear Stéfane, I will surely follow your interesting suggestion but I miss some important informations to accomplish the task.
In order to adapt your example to our needs (in my case, modify the "Phone" Property), how can I get a full help about all possibile methods and property that can be used in the PowerShell?
I'm getting errors like
"+ FullyQualifiedErrorId : MethodNotFound"
"+ FullyQualifiedErrorId : PropertyNotFound"
Thank you for your support

avatar

Full documentation: http://help.remotedesktopmanager.com/index.html?powershell_cmdlets.htm

This may also help you:
http://blog.devolutions.net/2013/01/remote-desktop-manager-automation-via_7320.html
and/or (they overlap)
http://help.remotedesktopmanager.com/index.html?tipsandtricks_powershell.htm

Post your PowerShell script, I can then give you a hand with it.

Setting the phone will look something like this:
Set-RDM-Property -ID $session.id -Path "MetaInformation" -Property "Phone" -Value $item.Phone

Stéfane Lavergne

avatar

Hi Stéfane,
I decided to import a CSV file using available columns to pass all relevant informations to RDM, in my case "VoIPNumber" and "MobilePhone":
ConnectionType,Name,Group,Host,Description,URL,Username(VoIPNumber in place of "URL" and "MobilePhone" in place of "Username")

Then I go to the PowerShell and launch this script, that uses the URL (DescriptionUrl) and Username (MsUser) properties to set respectively CustomFiled1Value and CustomField2Value properties inside every session.
cls;

foreach ($list in Get-RDM-Session)
{
$VoIPNumber = Get-RDM-Property -id $list.id -path "VNC" -Property "MsUser"
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "CustomField1Value" -value $VoIPNumber -NoRefresh
$MobilePhone = Get-RDM-Property -id $list.id -Property "DescriptionUrl"
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "CustomField2Value" -value $MobilePhone -NoRefresh
$title = Get-RDM-Property -id $list.id -Path "MetaInformation" -Property "Title"
Set-RDM-Property -ID $list.ID -path "VNC" -Property "MsUser" -value $title -NoRefresh
Set-RDM-Property -ID $list.ID -Property "DescriptionUrl" -value $title -NoRefresh
}
The scripts then exits resetting "URL" and "Username" to a blank value ("Title" property must be blank).
edited by stenkarazin on 6/17/2013
edited by stenkarazin on 6/17/2013
edited by stenkarazin on 6/17/2013

avatar

Well done, thank you for sharing.

FYI you could also use $null instead of the $title trick to clear the MsUser & DescriptionUrl

Stéfane Lavergne

avatar

Thank you, I find RDM really impressive but I'm even more impressed by your quick and effective technical support.

avatar

cls;

foreach ($list in Get-RDM-Session)
{
$VoIPNumber = Get-RDM-Property -id $list.id -path "VNC" -Property "MsUser"
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "CustomField1Value" -value $VoIPNumber -NoRefresh
$MobilePhone = Get-RDM-Property -id $list.id -Property "DescriptionUrl"
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "CustomField2Value" -value $MobilePhone -NoRefresh
Set-RDM-Property -ID $list.ID -path "VNC" -Property "MsUser" -value "" -NoRefresh
Set-RDM-Property -ID $list.ID -Property "DescriptionUrl" -value "" -NoRefresh
}