PowerShell-Docs
PowerShell-Docs copied to clipboard
Get-ComputerInfo throws an error on Server 2008R2
Issue Details
Identified that cmdlet documented in this repo has a compatibility issue with Server 2008R2.
Recommendation
Introduce a section that indicates the cmdlet is compatible with Server 2012 and later.
Get-ComputerInfo was introduced in PowerShell 5.1. While WMF 5.1 supports Windows Server 2008 R2, this cmdlet does have an error there:
PS C:\Users\testUser> 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
The ref article is being updated for 5.1 and 6 to indicate that the cmdlet was added in 5.1 The 5.1 page is also being updated to specify this cmdlet is only supported for Windows Servers on 2012 and higher.
Note In PowerShell Core 6, which also supports Windows Server 2008 R2, this cmdlet works.