Set-RDM-Datasource;Xml data source initialization

Set-RDM-Datasource;Xml data source initialization

avatar
marg
Disabled

Hi.

I got a problem while importing some sessions into the RDM via Powershell.

I have 2 Datasources:
"Local Data Source" and "RDMconnects"

Before i can import the sessions, i need to change the Datasource to "RDMconnects" because the
Local Data Source is always current.
For that i will use: Set-RDM-DataSource -ID

So, now the problem.
Everytime i run the script i get a PopUp "Xml data source initialization - Configure your security settings" >> see attachment..
I want to use that script in a GUI and want to get rid of this, so just set the RDMconnects data source.

Is there a way to avoid that PopUp?

Thank you!

RDM_XML.jpg

All Comments (7)

avatar

You need to initialize the "Local Data Source" once done the prompt will no longer be displayed.

Now if you don't use this data source you can simply deleted it.

Stéfane Lavergne

avatar

The problem is, i want to provide that script to several users.
They only choose the clients and servers to import at the GUI and the script will do that for them.

some of them use the local data source, so deleting it is unfortunately no solution.
And to tell everyone of them to initialize it once, before they can use the script, is not the way i prefer tbh..

Is there no other way to make it invisible or something else?

thanks..

avatar

I see your dilemma, I will see what we can do.

Stéfane Lavergne

avatar

Fixed internally, it will be available in the next release.

What is does is if ever you open an Xml data source in PowerShell for the very first time then it simply chooses the default master key without prompting the user (no UI).

It would then be up to the user to go change the master key at a later date through RDM for that data source.

I hope that resolves your issue adequately?

Stéfane Lavergne

avatar

Hello, nice to hear that it is in the next release!

What do you mean with that:
"What is does is if ever you open an Xml data source in PowerShell for the very first time then it simply chooses the default master key without prompting the user (no UI)."

I can't see what you mean, sorry.

BTW, when i import a few sessions (around 30).
I first read the Hostname and so on from a .csv File and then create a new session and set the properties..
Until all of them are imported it needs a few minutes (~5min)
If i import a .rdm-File through "file - import - import session list" it only needs a few seconds.
Is there something i do wrong?

Code:
$session = New-RDM-Session -Name $Name -Host $MachineName -Kind "RDPConfigured"
Set-RDM-Session $session

$list = $session
Set-RDM-Property -ID $list.ID -Property "Group" -Value $Group
Set-RDM-Property -ID $list.ID -Path "MetaInformation" -Property "OS" -Value $OS
Set-RDM-Property -ID $list.ID -Path "RDP" -Property "Domain" -Value $Domain
Set-RDM-Property -ID $list.ID -Path "RDP" -Property "UserName" -Value $UserName
Set-RDM-Property -ID $list.ID -Property "Url" -Value $MachineName
Set-RDM-Property -ID $list.ID -Property "Domain" -Value $Domain
Set-RDM-Property -ID $list.ID -Property "UserName" -Value $UserName


Thanks for your support :)

avatar

Xml data sources must be initialized prior to accessing it’s properties or create a session. This is done via the “Xml data source initialization” window. If this situation happens in PowerShell mode then the user is not prompt instead the system will automatically select the default master key.

As for the speed issues using the –NoRefesh option on the Set CmdLets will speed up the process.

Something like:

$session = New-RDM-Session -Name $Name -Host $MachineName -Kind "RDPConfigured"
$session.Group = $Group
$session.MetaInformation.OS = $OS
Set-RDM-Session $session -NoRefresh
Set-RDM-Domain -ID $session.ID -Domain $Domain -NoRefresh
Set-RDM-UserName -ID $session.ID -UserName $UserName

Now you will notice a few changes











Stéfane Lavergne

avatar

Hey..

Wow, it's much faster now, the only thing that doesn't work you wrote:
$session.MetaInformation.OS = $OS

i did it like the examples below with set property -norefresh, and then it worked.

but thank you for your help, amazing support :)