Skip to content

Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'." #3023

@n3l5

Description

@n3l5

Error Message:
"Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'."

Environment:

Windows Management Framework 5.1
Operating System: Windows 7 x64

Examples

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

PS C:\Users\user> Get-ComputerInfo -Property TimeZone
Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'.
At line:1 char:1
+ Get-ComputerInfo -Property TimeZone
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-ComputerInfo], EntryPointNotFoundException
    + FullyQualifiedErrorId : System.EntryPointNotFoundException,Microsoft.PowerShell.Commands.GetComputerInfoCommand
Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Activity

iSazonov

iSazonov commented on Jan 20, 2017

@iSazonov
Collaborator

@n3l5 Thanks for bug report!

GetFirmwareType is introduced in Windows 8 and Windows Server 2012

joeyaiello

joeyaiello commented on Jan 23, 2017

@joeyaiello
Contributor

Given the behavior isn't there on Win7, I'm not sure what we can do other than do a better of job of erroring out. We also wouldn't ship a change for that unless we had a hypothetical WMF 5.2, though I'm not speaking here to whether that's happening or not.

n3l5

n3l5 commented on Jan 23, 2017

@n3l5
Author

Unless there is an option to feature request a kernel fix for Win 7 to support this, can be closed out since this appears to be a kernel feature and Win 7 is on the way out.

joeyaiello

joeyaiello commented on Jan 23, 2017

@joeyaiello
Contributor

Thanks @n3l5!

zii-dmg

zii-dmg commented on Mar 19, 2017

@zii-dmg

Isn't solution is just one if check for windows version in GetComputerInfoCommand.cs?

added
Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributors
and removed
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.
on Mar 19, 2017
SteveL-MSFT

SteveL-MSFT commented on Mar 19, 2017

@SteveL-MSFT
Member

We should wrap the api calls so this fails silently.

jeffbi

jeffbi commented on Mar 20, 2017

@jeffbi
Contributor

Just as a point of interest, at the time this cmdlet was written the target OS was Win10.

Fortunately there aren't too many native API calls, so wrapping them shouldn't be too onerous.

@SteveL-MSFT I can take this one if you like.

iSazonov

iSazonov commented on Mar 20, 2017

@iSazonov
Collaborator

Perhaps it is time to start porting this cmdlet instead of doing partial fixes. It would be good to do it in Beta time.

SteveL-MSFT

SteveL-MSFT commented on Mar 20, 2017

@SteveL-MSFT
Member

Making it cross-platform is a pretty big task and probably something we'd do for 6.1.0. @jeffbi it should be pretty straightforward to wraps so they silentlycontinue for current release.

zii-dmg

zii-dmg commented on Apr 12, 2017

@zii-dmg

Alpha 18 no longer crash on GetFirmwareType in Windows 7, but other strange crash - #3541.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @joeyaiello@zii-dmg@n3l5@jeffbi@SteveL-MSFT

        Issue actions

          Get-ComputerInfo : Unable to find an entry point named 'GetFirmwareType' in DLL 'kernel32.dll'." · Issue #3023 · PowerShell/PowerShell