The Count and other properties of the items were not accessible if there
is only 1 item in the array. This fix ensures that all properties can be
read.
I wondered why a single important update wasn't installing using the
script but was easily installed manually. Using the Powershell debugger,
it was discovered that the properties do not actually exist.
This was tested and discovered in Windows Server 2012 R2. This results
in a longer update time, which proves that there are now more updates
being installed.
The Count and other properties of the items were not accessible if there is only 1 item in the array. This fix ensures that all properties can be read.
I wondered why a single important update wasn't installing using the script but was easily installed manually. Using the Powershell debugger, it was discovered that the properties do not actually exist.
This was tested and discovered in Windows Server 2012 R2. This results in a longer update time, which proves that there are now more updates being installed.