Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $ie = New-Object -ComObject 'internetExplorer.Application'
  2. $ie.Visible= $true
  3. $username="username@domain.com"
  4. $password="password"
  5. $ie.Navigate("https://www.yourwebsite.com")
  6. While ($ie.Busy -eq $true)
  7. {
  8. Start-Sleep -Seconds 3
  9. }
  10. $usernamefield = $ie.document.getElementByID('Email_ID').value="$username"
  11. $passwordfield = $ie.document.getElementByID('Password').value="$password"
  12. $Link = $ie.document.getElementByID('Login_ID')
  13. $Link.click() #or $Link.submit()
  14. $ie.Quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement