waldo1001 / Cloud.Ready.Software.PowerShell

waldo's PowerShell Scripts & Modules
http://www.waldo.be
85 stars 94 forks source link

Get-NAVCumulativeUpdateFile.ps1 fails on Windows Server 2016 #24

Closed javisoft closed 6 years ago

javisoft commented 7 years ago

I get the following error:

**_Cannot index into a null array. At line:73 char:9

If I open Internet Explorer and include the "microsoft.com" website into the compatibility view list, then it works. It looks like Powershell can't access the DOM objects when IE opens the website in normal mode?

I can definitely live with this workaround, but I was wondering if I am missing something here.

fvet commented 7 years ago

@javisoft I'm facing the same issue on Windows 10. Adding "microsoft.com" in the compatibility view list doesn't seem to fix the problem. Any hints?

SorenKlemmensen commented 7 years ago

I am running with Windows 10 but you need to start IE and select express settings the first time for it to work. On the server I expect the issue is the very restricted default settings of IE.

waldo1001 commented 7 years ago

Hm, I'm testing on Win2016 server. No problem at all. The compatibility-fix was a temporary fix to resolve the previous way of downloading CU's. So that should not be necessary. What I did do was disabling the "IE Enhanced Security Configuration". I do this manuall, but you can script that as well: http://stackoverflow.com/questions/9368305/disable-ie-security-on-windows-server-via-powershell .. Does that solve the issue?

javisoft commented 7 years ago

@fvet I don't have any issues on Windows 10. I'm running Windows 10 Enterprise. @waldo1001 Check out this video. It shows my settings, and how the script runs fine after I add the website to the compatibility view list. I have to be missing something.

waldo1001 commented 6 years ago

Well, as we have docker now, I'm not going to invest in this function anymore. It has been too reliant on Microsoft - and Microsoft is clearly going to invest in docker ...

You are more than welcome to have a look at it.