In part 2 of this series, you already witnessed how much easier and faster it was to query the list of installed operating system languages using WMI compared to using command line tools like dism.exe. However, WMI still requires you to know the appropriate WMI class name.
That’s why PowerShell sports the catch-all cmdlet Get-ComputerInfo. It queries all kinds of computer-related information for you and then lets it up to you which one you need. We could have solved the issue with this approach as well:
$a = Get-ComputerInfo
Unfortunately, though, Get-ComputerInfo always queries its full set of information which makes it slow. It’s better than nothing, and even better than dism.exe, but the direct WMI query from part 2 remains the most performant and effective way.
ReTweet this Tip!
Powered by IDERA