Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $url = "https://example.sharepoint.com/"
  2. $username="JohnDoe@example.com "
  3. $password="Password"
  4.  
  5.  
  6. $ie = New-Object -com internetexplorer.application;
  7. $ie.visible = $true;
  8. $ie.navigate($url);
  9.  
  10.  
  11. while ($ie.Busy -eq $true)
  12. {
  13. Start-Sleep -Milliseconds 1000;
  14. }
  15. $ie.Document.getElementById("login").value = $username
  16. $ie.Document.getElementByID("Passwd").value=$password
  17. $ie.Document.getElementById("cred_sign_in_button").Click();
  18.  
  19. <span id="cred_sign_in_button" tabindex="11" onclick="Post.SubmitCreds();return false;"
  20. class="button normaltext cred_sign_in_button refresh_domain_state" role="button">Sign in</span>
  21. <div id="recover_container" class="subtext smalltext">
  22. <span>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement