AnsweredAssumed Answered

Session Logout API Call with PowerShell v4

Question asked by Tim Raadt on Mar 23, 2016
Latest reply on Mar 23, 2016 by Tim Raadt

Has anyone had any luck writing a session logout call with PowerShell (using Invoke-WebRequest)?  I am able to login and get my session ID (using Invoke-WebRequest) but cannot get the logout to work, keep getting a 403.  I am setting the 3 headers that seem to be required:

X-Requested-With

QualysSession

Cookie

 

Also, I am able to get the session logout to work in PowerShell using a GetResponse() call and the same headers, but would like to be able to use the Invoke-WebRequest method.

 

Any help or example code would be appreciated.

 

Thanks!

Tim

Outcomes