Running commands in a specific user context in PowerShell
Using the Invoke-Command Cmlet, you can execute a script block in the security context of a different user.
Using the Invoke-Command Cmlet, you can execute a script block in the security context of a different user.
A few examples on how to do http requests via PowerShell’s Invoke-Webrequest cmdlet.