AndrewG-1234 / PRTG

13 stars 7 forks source link

Windows Server Core compatibility #3

Open ChMG opened 7 years ago

ChMG commented 7 years ago

At Windows Server Core versions no IE engine is available. So a normal "Invoke-WebRequest" will fail.

Add "-UseBasicParsing" parameter to all WebRequests.

Change $request = Invoke-WebRequest -Uri $url -MaximumRedirection 0 -ErrorAction Ignore to $request = Invoke-WebRequest -Uri $url -UseBasicParsing -MaximumRedirection 0 -ErrorAction Ignore

I have tested it on a Windows Server 2016 Core.