Hi,
I'm trying to put together an automated process that will generate a series of URL (WebBrowser) sessions based on (RDP) sessions in a different group. The basics are good - the session is created with the correct (server) name, URL and type but I'm struggling to identify the way to set the Form login information.
When I export and view the XML, I see there is a <Web> entry but it is empty when I query using
Get-RDM-Property -ID $_.ID -Property Web
Note that I get valid information returned if I use the same query but look for WebBrowserApplication
Here is the excerpt of the XML that I'm using:
<Web>
<PasswordControlId>Password</PasswordControlId>
<SubmitControlId>modal-submit</SubmitControlId>
<UserNameControlId>Username</UserNameControlId>
</Web>
Any help would be appreciated.
edited by kollenh on 6/27/2013
The xml structure looks like this:<Web> <Domain>mydomain</Domain> <DomainControlId>myDomainID</DomainControlId> <FormId>myFormID</FormId> <PasswordControlId>myPasswordID</PasswordControlId> <SafePassword>LH3I42eNfLddo06EA2CGKQ==</SafePassword> <SubmitControlId>myLoginID</SubmitControlId> <UserName>myuser</UserName> <UserNameControlId>myUserID</UserNameControlId> </Web> <WebBrowserApplication>IE</WebBrowserApplication> <WebBrowserUrl>myurl</WebBrowserUrl>
Something like this should work:$secure = [color=rgb(0, 0, 0)][font=Consolas, Courier, monospace]ConvertTo-SecureString $password;[/font][/color]Set-RDM-Password -ID $_.ID -Password $secure -NoRefresh;Set-RDM-UserName -ID $_.ID -[font=verdana]Username[/font] $UserName;
if you want/need to set the control ids you will need to first set the WebBrowserApplication to "IE"Set-RDM-Property -ID $_.ID -Property WebBrowserApplication -Value IE;
As for the control ID:Set-RDM-Property -ID $_.ID -Path Web -Property UserNameControlId -Value myID;
None of the above code snippets have been tested, but it should work.
Regards,
Stéfane Lavergne
Thank you Stéfane! Using '-path Web' was the key. For anyone else attempting the same, please note that 'Web' is case-sensitive.
I did have some difficulties getting all the values to set in one pass but I just looped through the group, setting each value I wanted per loop.
Love this product.