topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 12:21 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Powershell Invoke-WebRequest  (Read 1660 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,824
    • View Profile
    • Donate to Member
Powershell Invoke-WebRequest
« on: September 23, 2021, 11:32 AM »
Hello!

I am not very familiar with the http terminology, what certificate, authentication, method, session, etc are.

I think in many cases, when you login to a website via a form, it creates a cookie based on which you keep your access to the site.

Which of the below (or other?) parameters should I need to specify to make PowerShell Invoke-WebRequest to behave like IE/Edge, i.e. to check and use whatever cookies and authentication has already taken place via the browser?

      [-WebSession <WebRequestSession>]
      [-SessionVariable <String>]
      [-AllowUnencryptedAuthentication]
      [-Authentication <WebAuthenticationType>]
      [-Credential <PSCredential>]
      [-UseDefaultCredentials]
      [-CertificateThumbprint <String>]
      [-Certificate <X509Certificate>]
      [-SkipCertificateCheck]
      [-SslProtocol <WebSslProtocol>]
      [-Token <SecureString>]
      [-Method <WebRequestMethod>]
      [-PreserveAuthorizationOnRedirect]
      [-SkipHeaderValidation]

Thanks!