jdhitsolutions / PSScriptTools

:wrench: :hammer: A set of PowerShell functions you might use to enhance your own functions and scripts or to facilitate working in the console. Most should work in both Windows PowerShell and PowerShell 7, even cross-platform. Any operating system limitations should be handled on a per command basis. The Samples folder contains demonstration script files
MIT License
901 stars 112 forks source link

[Bug]: Get-WindowsVersion/Get-WindowsVersionString on non-English based systems #142

Closed t0rsten closed 3 months ago

t0rsten commented 11 months ago

Describe the problem

On a non-English speaking system (in my case German) the following error message occurs.

2023-10-20_03h44_36

The reason is that systeminfo.exe is fully translated.

2023-10-20_03h43_37

Expectation

No response

Additional Information

From my point of view, systeminfo.exe should not be used and the WMI class Win32_OperatingSystem should be used instead.

(Get-CimInstance -ClassName Win32_OperatingSystem -Property Caption).Caption

PowerShell version

7.3

Platform

Windows 10 Pro or Enterprise

Additional Checks

jdhitsolutions commented 11 months ago

I will take a look when I am back home. I think I went with the tool because it gave me extra info. But it has been a long time since I have looked at the command.

jdhitsolutions commented 4 months ago

I finally got a little free time to look at this. I see what is happening now. I will have to get creative here.

jdhitsolutions commented 4 months ago

I think I will have something in the next release for you to try.

t0rsten commented 4 months ago

Let me know when I can test it.

jdhitsolutions commented 4 months ago

I have published 2.49.0 to the PowerShell Gallery if you want to update and test.

t0rsten commented 3 months ago

Problem solved. Thanks a lot!