This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Active Roles 7 Web site status with PowerShell.

I have been looking for a way to monitor the Active Roles website with PowerShell. I have been stuck when pulling in a page request via Invoke-WebRequest and System.Net.WebClient.

Example 1:
$ARSURL= "https://ars.org"
$Creds = Get-Credential
Invoke-WebRequest -Uri $URL -Credential $Creds
And I get the following error: "Invoke-WebRequest : Server Error
401 - Unauthorized: Access is denied due to invalid credentials."

Example 2:
$webclient = new-object System.Net.WebClient
$webclient.Credentials = new-object System.Net.NetworkCredential($username, $password, $domain)
$webpage = $webclient.DownloadString($url)
And I get the following error: Exception calling "DownloadString" with "1" argument(s):
"The remote server returned an error: (401) Unauthorized."

Any idea on how I can connect to the ARS website via PowerShell?