There is a script:
$html = Invoke-WebRequest -Uri https://www.mcafee.com/enterprise/en-us/downloads/security-updates.html
$dathtml = ($html.parsedhtml.getelementsbytagname("TR") |% { ( $_.children | ?{ $_.tagName -eq "td"} | % innerText ) } | Select-Object -First 1).Split('xdat')[0]
Write-Host $dathtml
The problem is the following:
Invoke-WebRequest : ERROR
Cache Access Denied.
The following error was encountered while trying to retrieve the URL: https://www.mcafee.com/*
Cache Access Denied.
Sorry, you are not currently allowed to request https://www.mcafee.com/* from this cache until you have authenticated yourself.
Please contact the cache administrator if you have difficulties authenticating yourself.
Generated Wed, 25 Jul 2018 09:49:32 GMT by xxxxx (xxxx)
At line:1 char:9
+ $html = Invoke-WebRequest -Uri https://www.mcafee.com/enterprise/en-u ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
You cannot call a method on a null-valued expression.
At line:2 char:1
+ $dathtml = ($html.parsedhtml.getelementsbytagname("TR") |% { ( $_.chi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Is there any way to integrate the proxy server authentication method into the script ( AD auth ). If I run this script on my computer ( without proxy, on public net etc... ) it works. But I have to run this script from another computer which use proxy, the site is allowed but not able to get the information what I need. Any suggestion? Thanks