I tried below solution to basically retrieve table info from an url, or just html content form the url, but its not working in Powershell 2.0 as I can run this same script in powershell 5.0 please help me find some solution
$url= "https:\\somewebsite"
$WebRequest = New-Object System.Net.WebClient
$WebRequest.UseDefaultCredentials = $true
$html = $WebRequest.DownloadString($url)
PowerShell 2.0 does not have
-UseDefaultCredentials.Change it to use
.Credentialsinstead: