| https://github.com/puppetlabs/bolt/blob/master/modules/facts/tasks/powershell.ps1 uses System.Environment.OSVersion to determine the OS Version of the target node. As explained in https://github.com/PowerShell/PowerShell/issues/2009, .NET Core did not implement this method correctly because the underlying API it calls isn't cross-platform. There is more detail in https://github.com/dotnet/coreclr/pull/6006, with no clear resolution. The result of this is that in .NET Core, the value is either incorrect or returns an error that it isn't implemented. On Windows 10, running under PowerShell Core, it returns 8.1. Bolt does not use pwsh.exe, it uses powershell.exe, so there is no immediate problem here. However this will be a subtle bug in the future, that won't manifest as an error but as incorrect data instead. |