Bomgar Representative Console session via PS

Bomgar Representative Console session via PS

avatar
kstonernasg
Disabled

I would like to add Bomgar Representative Console session via powershell is this possible?

All Comments (7)

avatar

Short answer: Yes

But it won't be easy, it's an addon so you will need to set a series of properties (via SetProperty calls) to set internal AddOn related information. Then you will need create an XML string containing the Bomgar information and set that into the session. As a final step you would set the password and save the session.

I can give you a hand at getting it started if you like.

Regards,

Stéfane Lavergne

avatar

This isn't exactly what you would need to do but it gives you an idea of the complexity.

http://forum.devolutions.net/topic2664-import-your-technet-subscription-via-xml.aspx



In your case these classes are called BomgarConsoleConfiguration & AddOnConnection

Stéfane Lavergne

avatar

I would like to do this, I wrote one to add teamviewer sessions.

Can you give me a basic shell to work with?

avatar

No problem.

First create a sample Bomgar session using the UI:
- configure it
- Save it
- now in the tree view, select the session, right-click -> Clipboard -> Copy
- paste the result in your favorite text editor

This is what we are going to have to reproduce in PowerShell

Sample<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<AddOn>
<AddOnDescription>Bomgar Representative Console AddOn</AddOnDescription>
<AddOnVersion>2.0.0.0</AddOnVersion>
<Properties><?xml version="1.0"?>
<BomgarConsoleConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SafePassword>.......</SafePassword>
<ScriptFilename>C:\Users\...</ScriptFilename>
<StartingMethod>ScriptOnDisk</StartingMethod>
<UserName>username</UserName>
</BomgarConsoleConfiguration></Properties>
</AddOn>
<ConnectionSubType>d716fd7b-a010-45eb-8455-03e6e61809ba</ConnectionSubType>
<ConnectionType>AddOn</ConnectionType>
<Name>Bomgar</Name>
</Connection>
</ArrayOfConnection>
Also, if you could private message me (or email slavergne.at.devolutions.dot.net) your test sesssion it would help.

Stéfane Lavergne

avatar

Sent an email with information.

Cheers

avatar

I haven't received your email, odd but not worries. Here is a "somewhat tested" script:

cls;

$s = New-RDMSession -Name "Bomgar Test" -Kind "AddOn"

# hard coded values, do not change
$s.AddOn.AddOnDescription = "Bomgar Representative Console AddOn"
$s.AddOn.AddOnVersion = "2.0.0.0"
$s.ConnectionSubType = "d716fd7b-a010-45eb-8455-03e6e61809ba"
# hard coded values, do not change

# set your values...
$bomgar = New-Object RemoteDesktopManager.AddOn.BomgarConsoleAddOn.BomgarConsoleConfiguration;
$bomgar.BomgarSite = "BomgarSite"
$bomgar.UserName = "UserName"

# this
$bomgar.StartingMethod = 1; # ScriptOnDisk
$bomgar.ScriptFilename = "ScriptFilename"

# or
# $bomgar.StartingMethod = 0 # SearchString
# $bomgar.SearchString = "SearchString"

# or
# not sure we can get this one to work...
# $bomgar.StartingMethod = 2 # ScriptInSession

$xml = $bomgar.ToXml();
$s.AddOn.Properties = $xml;

# set password
$s.SetPassword("random");

Set-RDM-Session $s;

Stéfane Lavergne

avatar

That works perfectly! Thanks! I'll post my script (scrubbed) when complete. It takes information from a database and posts it to RDM.