Quantcast
Viewing latest article 11
Browse Latest Browse All 26374

Invoke-webrequest

Hi All,

I am executing the powershell script Invoke-webrequest for few sharepoint sites.

Among 10 SharePoint sites, 1 sharePoint site gave the output as status code "200" and status description "ok". This is a separate webapplication than the others.

But in other SharePoint sites, the output is "401 - Unauthorized"

However when I added "usedefaultcredentials" i.e the script becomes   Invoke-webrequest -usedefaultcredentials, then all the 9 sharePoints are giving output as "ok".

Please let me know why it happens for these 9 sites. how should I make them run successfully giving status code "200" without using "usedefaultcredentials".

Thanks



Viewing latest article 11
Browse Latest Browse All 26374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>