Check the Embedded Controller (EC) Firmware Version in Powershell

By | January 10, 2019
Share

Here is a snippet for checking the EC version.  It tosses a dialog with it’s result.

Pre-reqs:

1\This snippet uses Powershell App Deploy Toolkit functions.

https://psappdeploytoolkit.com/

2\You’ll need to place the .mof and .dll files from our WMI BIOS util in the files folder.

ftp://ftp.panasonic.com/computer/software/WMI_Release_V1.00L31.zip

 

 

## <Perform Installation tasks here>
Show-InstallationProgress -StatusMessage "Copying DLL and MOF files"
Copy-File -Path "$dirFiles\SetBIOS4Conf.dll" -Destination "$envSystem32Directory\SetBIOS4Conf.dll"
Copy-File -Path "$dirFiles\PNSNProv.dll" -Destination "$envSystem32Directory\PNSNProv.dll"
Copy-File -Path "$dirFiles\SetBIOS4Conf.mof" -Destination "$envSystem32Directory\SetBIOS4Conf.mof"
Copy-File -Path "$dirFiles\PNSNProv.mof" -Destination "$envSystem32Directory\PNSNProv.mof"
                             
Show-InstallationProgress -StatusMessage "Importing MOF files"
Execute-Process -Path "mofcomp.exe" -Parameters "$envSystem32Directory\PNSNProv.mof"
Execute-Process -Path "mofcomp.exe" -Parameters "$envSystem32Directory\SetBIOS4Conf.mof"
                             
Show-InstallationProgress -StatusMessage "Importing DLL files"
Execute-Process -Path "regsvr32.exe" -Parameters ('/s "{0}\PNSNProv.mof"' -f $envSystem32Directory) -IgnoreExitCodes 3
        
$EcVersion = (gwmi -Namespace "root\PanasonicPC" -Query "SELECT * FROM SetBIOS4Conf").ECVersion
if ($EcVersion -eq "V3.00L12") {
    Show-DialogBox -Title 'EC Version Check' -Text ('Your EC version({0}) is correct.' -f $EcVersion) -Icon 'Information'
} else {
    Show-DialogBox -Title 'EC Version Check' -Text ('Your EC version({0}) is incorrect.' -f $EcVersion) -Icon 'Exclamation'
}

/BG

 

4 thoughts on “Check the Embedded Controller (EC) Firmware Version in Powershell

  1. James

    Are there any silent switches to the BIOS Update file or a side utility to load it silently (BiosUpdate_R18-0404_64.exe)?

    Reply
  2. Mark P

    Hey Brian,

    Is there are good way to integrate the EC Update in the task sequence for imaging? I attempted to add it similar to the BIOS update, but since this requires a shutdown it ended up causing issues with the Task Sequence continuing. Calling for a restart from the Task Sequence didn’t initiate the EC update either.

    Thanks,

    MP

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.