Get-ComputerInfo fails on Windows 7

Viewed 946

Should this work?

>$PSVersionTable.PSVersion.ToString()
5.1.14409.1018

>(Get-CimInstance -ClassName CIM_OperatingSystem).Caption
Microsoft Windows 7 Enterprise

>Get-ComputerInfo
Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'.
At line:1 char:1
+ Get-ComputerInfo
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ComputerInfo], EntryPointNotFoundException
    + FullyQualifiedErrorId : System.EntryPointNotFoundException,Microsoft.PowerShell.Commands.GetComputerInfoCommand
1 Answers

Appears to be an issue with PowerShell 5.1 that wasn't corrected until PowerShell 6. I found this bug report on the PowerShell GitHub site. Bugs for PowerShell 6 are typically not backported to PowerShell 5.x.

There are several commands added in PS 5.1 that don't work at all on Windows 7. Resolve-DnsName, for example.

Related