jborean93/ansible-windows

A part of the code is deprecated on windows 8.1, runs but with wrong result

MatsIBengtsson opened this issue · 1 comments

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.

Thanks, I went a slightly different route as part of #10 but it achieves the same results.