A part of the code is deprecated on windows 8.1, runs but with wrong result
MatsIBengtsson opened this issue · 1 comments
MatsIBengtsson commented
The code $os_version = [System.Environment]::OSVersion.Version uses a deprecated function in windows 8.1. It returns a value, but thw wrong value (identifies as Windows server 2012).
Changing it to $os_version =(Get-CimInstance Win32_OperatingSystem).version gives the right version.