ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Powershell Invoke-WebRequest

(1/1)

kalos:
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!

Navigation

[0] Message Index

Go to full version