Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Url = 'https://www.eurotoll.fr/dynamic/login/login.action?LANGUE=fr'
- $Username = “l.lucas@epsilog.eu”
- $Password = “GEWAWEN2”
- $IE = New-Object -com internetexplor er.application;
- $IE.visible = $true
- $IE.navigate($url)
- $doc = $ie.document
- # Wait a few seconds and then launch the executable.
- while ($IE.Busy -eq $true)
- {
- Start-Sleep -Milliseconds 2000;
- }
- # The following UsernameElement, PasswordElement, and LoginElement need to be modified first. See the notes at the top
- # of the script for more details.
- $IE.Document.getElementById(“j_username”).value = $Username
- $IE.Document.getElementByID(“j_password”).value = $Password
- $termsField = $ie.document.getElementsByName("terms")
- @($termsField)[0].value ="powershell"
- $submitButton = $ie.document.getElementsByTagName("input")
- Foreach($element in $submitButton )
- {
- if($element.value -eq "OK"){
- Write-Host $element.click()
- }
- }
- Start-Sleep 10
- while ($IE.Busy -eq $true)
- {
- Start-Sleep -Milliseconds 2000;
- }
- # Invoke-Item $Executable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement