locked
Invoke-webrequest trough https://login.windows.net/common/wsfed RRS feed

  • Question

  • Hello

    I am learning Powershell

    I want to do a webrequest with Powershell

    $PWD = ConvertTo-SecureString –String "Password" –AsPlainText -Force;
    $Cred = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList "test@test.eu", $PWD   
    $r = Invoke-WebRequest -Uri "https://www.test.eu/test"  -Credential $Cred
    
    $r.RawContent
    
    

    www.test.eu/test wil redirect me to a https://login.windows.net/common/wsfed.

    How can i log trough that login with the given creds?

    Kind regards

    Harm Schutte

    • Moved by Bill_Stewart Friday, July 4, 2014 12:59 AM Abandoned
    Friday, January 17, 2014 8:03 AM

All replies

  • Generally speaking you can't.  If the login page is not directly available then the page is protected against automated logins.


    ¯\_(ツ)_/¯

    Friday, January 17, 2014 1:12 PM