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:
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.