Hi All,
I have had great success creating entries with power shell.
The issue i have is with an addon, i cant see how to create the XML format required with set-rdmsessionproperty command.
This is how it should look:
ArrayOfConnection>
<Connection>
<VPN>
<Application>AddOn
</Application>
<ApplicationSubType>b98463a9-4e1f-4220-960c-b996cebb852c</ApplicationSubType>
<AutoClose>false</AutoClose>
<CloseMode>Manually</CloseMode>
</VPN>
<ConnectionType>VPN</ConnectionType>
<Group>Honywood</Group>
<ID>9dc27f17-ef7c-4e77-a281-f5fffa72d68f</ID>
<Name>SSL-VPN</Name>
<Stamp>5defbc68-cdde-4455-bc4f-e97c2543687a</Stamp>
</Connection>
</ArrayOfConnection>
This is what i get:
<ArrayOfConnection>
<Connection>
<AddOn />
<ConnectionType>AddOn</ConnectionType>
<Group>Local</Group>
<ID>b3d19cc3-d23d-4ebf-8847-907cf18d273b</ID>
<Name>watchguardssl</Name>
<OpenEmbedded>true</OpenEmbedded>
<Stamp>6b6e3518-6a56-451e-98df-03c633c6d29c</Stamp>
<TemplateSourceID>788a2127-bbf4-4cff-a7e9-2aa3f8f4747d</TemplateSourceID>
</Connection>
</ArrayOfConnection>
I can see no way of creating the <VPN>
Please help if possible.
Hello,
Which AddOn do you want to work with PowerShell?
Best regards,
Érica Poirier
Hi Erica,
It is the Watchguard SSL VPN Addon
Thanks
Hi Erica,
Fresh eyes this morning. I have got round this by creating an entry and converting it to a template. I then use the template to create the entry on the powershell script. All working now.
Thanks.
Hello,
Thank you for your feedback. It's a good method to create the entry from a template. Glad that it's working now!
Best regards,
Érica Poirier
Spoke to soon,
I can create the entry but i cannot insert the hostip address into the host name field of the entry. When i export the entry after manually editing it the value isnt exported. Where would this be held?
Hello,
The inner XML code of the properties of the WatchGuard SSL AddOn is located in the property VPN.AddOn.Properties.
Best regards,
Érica Poirier
Hi Erica,
Thanks for the reply.
Im having trouble setting the value:
Set-RDMSessionProperty $Session.ID -Path "$sess.VPN.AddOn.Properties" -Property "Host" -Value "$HostIP"
or
Set-RDMSessionProperty $Session.ID -Path "VPN.AddOn.Properties" -Property "Host" -Value "$HostIP"
Both return path or property not found.
Can you help please.
Hello,
Because $sess.VPN.AddOn.Properties contains XML code as a text field, you cannot change any properties with the Set-RDMSessionProperty cmdlet.
You have to put the content in a XML variable then put it back in the VPN.AddOn.Properties as plain text.
Here is a sample on how you can modify the Host property of the WatchGuard SSL VPN AddOn.[xml]$xmlProperties = $sess.VPN.AddOn.Properties$xmlProperties.Configuration.Host = "YourHost"$sess.VPN.AddOn.Properties = $xmlProperties.InnerXmlSet-RDMSession $sess -refresh
Best regards,
Érica Poirier
Erica,
You are a star!!!!
Thanks again.