impranayk
Enthusiast
Enthusiast

Invoke-Webrequest : The remote server returned an error: (401) Unauthorized.

I am running below script to export vROps configuration. My purpose is to export the configuration from old vROps and import into the new appliance.

https://michaelryom.dk/export-settings-from-vrops/

While running this script, I am getting attached error. I putting correct credentials which I am using to login to vROps console.

Invoke-Webrequest : The remote server returned an error: (401) Unauthorized.

Error.JPG

------------------------------------------------------------------------- Follow me @ www.vmwareinsight.com Please consider marking this answer "correct" or "helpful" if you found it useful Pranay Jha | Blog: http://vmwareinsight.com vExpert 2016/2017, VCAP5-DCD/DCA, VCP5-DCV, VCA-Cloud, VCE-CIA, MCSE, MCITP
Tags (3)
0 Kudos
1 Reply
LucD
Leadership
Leadership

When you use Invoke-RestMethod instead of Invoke-WebRequest, see Access Internal REST APIs in vR Ops with PowerShell, do you see the same result?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos