I'm trying to access a site that has Windows Security on it:
So I referenced this post and wrote the following code:
$web = New-Object Net.WebClient
$web.Credentials = new-object System.Net.NetworkCredential($username, $password, $domain)
$content = $web.DownloadString("https://my.url")
But I still get the same error I got before adding credentials: "The remote server returned an error: (401) Unauthorized."
I then referenced this post, but I don't think basic authentication applies in this case. I have verified the username, password, and domain several times. Are there other commonly used solutions for making web requests with authentication?