Adding SubConnections at Import

Adding SubConnections at Import

avatar
marg
Disabled

Hey,

im currently expanding my selfmade import script for powershell and wanted to add subconnections. But i can't find out how to do it...

Currently im adding the main session like this:

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

$session.Group = $Group

Set-RDM-Session $session -NoRefresh

$sessioncheck = Get-RDM-Session

If ($sessioncheck -match $session.id)

{

Set-RDM-Property -ID $session.ID -Path "MetaInformation" -Property "OS" -Value $OS -NoRefresh

Set-RDM-Domain -ID $session.ID -Domain $Domain -NoRefresh

Set-RDM-UserName -ID $session.ID -UserName $UserName

Set-RDM-Property -ID $session.ID -Property "ImageMD5" -Value $ImageMD5

Set-RDM-Property -ID $session.ID -Property "ImageName" -Value $ImageName

}

Now.. I want a Subconnection added to this entry. In this subject it would be the DELL iDRAC from the Server.

Can you help me out?

PS:

Is there a way to add the iDRAC Entry straight via the CMDlet? There is no choice for "iDRAC" in the -Kind parameter? As a workaround i am doing it via a template where i set the iDRAC session and use -Kind "undefined". Is there an easier way?

Thank you in advance.

Gregor

All Comments (11)

avatar

Hello,

It is possible to add subconnections with the RDM PowerShell cmdlets. Because some cmdlets have been deprecated (New-RDM-Session, Set-RDM-Session, ...), I suggest to update them by their newest counterparts (New-RDMSession, Set-RDMSession, ...). Please consult our Online Help about PowerShell CmdLets Deprecated.

Now, the script for adding a subconnection to an entry, an iDrac connection type, would look like this :

$session = New-RDMSession -Name $Name -Host $MachineName -Kind "RDPConfigured"

Set-RDMSession $session

$iDracSub = New-RDMSession -Name $iDracName -Kind "iDrac"

$iDracSub.iDrac.Url = "http://your-url.com"

$session.Children += ,$iDracSub

Set-RDMSession $session

Best regards,

Érica Poirier

avatar
marg
Disabled

Good Morning,

thanks for your help. Unfortunately i can't get your example script to work (see attachment)

Best regards,

Gregor

avatar

Hello,

Which version of RDM are you running?

Best regards,

Érica Poirier

avatar
marg
Disabled

Hey,

we are using the Enterprise Edition Version 11.1.0.0.

Best regards,

Gregor

avatar

Hello,

Which type of Data Source are you using?

Best regards,

Érica Poirier

avatar
marg
Disabled

Hi,

we are using SQL Database. Currently based on SQL Server 2008 R2. In the future it will be SQL Server 2014.

Best regards

avatar

Hello,

I was able to reproduce your issue with the version 11.1.0.0 and it has been fixed in the version 11.5.0.0.

Could you please upgrade your RDM to the version 11.5.4.0? You can download it here http://remotedesktopmanager.com/Home/Download!

Best regards,

Érica Poirier

avatar
marg
Disabled

Hi,

it's working now, thank you!

Just another question. We will deploy this powershell import script to our users, so they can easily import their test environments.

In that case we need to register the RemoteDesktopManager.PowerShell.dll first. We did that in previous versions via the installutil.exe without problems.

As i did it manually for test now, i needed to unblock the .dll in the installation folder first. Do we need to do this on every client now?

Can you tell me (maybe a code example) what is needed to get the cmdlets to work properly?

Best regards,

Gregor