none
Firmware Change Scripts for Lenovo Ideacentre 510s-08ikl RRS feed

  • Question

  • Hi Techies,

    I'm looking for BIOS to UEFI Conversion in Lenovo Ideacentre 510s-08ikl during Inplace Upgrade. I have tried to execute the Following vbs Scripts for the Firmware changes but unfortunately it was not working for me.

    Here's Scripts and TaskSequence Details.

    Script1

    Dim strRequest,objWMIService,objItem


    Set objWMIService = GetObject("WinMgmts:" &"{ImpersonationLevel=Impersonate}!\\.\root\wmi")


    For Each objItem in objWMIService.ExecQuery("Select * from Lenovo_SetBiosSetting")
        ObjItem.SetBiosSetting "SecureBoot,Enable;", strReturn
        WScript.Echo " SetBiosSetting: " + strReturn
    Next


    For Each objItem in objWMIService.ExecQuery("Select * from Lenovo_SaveBiosSettings")
        ObjItem.SaveBiosSettings ";", strReturn
        WScript.Echo " SaveBiosSettings: " + strReturn
    Next

    Scripts 2:

    '
    ' Set specific BIOS Setting
    '
    On Error Resume Next
    Dim colItems


    If WScript.Arguments.Count <> 2 Then
        WScript.Echo "SetConfig.vbs [setting] [value]"
        WScript.Quit
    End If


    strRequest = WScript.Arguments(0) + "," + WScript.Arguments(1) + ";"


    strComputer = "LOCALHOST"     ' Change as needed.
    Set objWMIService = GetObject("WinMgmts:" _
        &"{ImpersonationLevel=Impersonate}!\\" & strComputer & "\root\wmi")
    Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SetBiosSetting")


    For Each objItem in colItems
        ObjItem.SetBiosSetting strRequest, strReturn
    Next


    WScript.Echo strRequest
    WScript.Echo " SetBiosSetting: " + strReturn


    If strReturn <> "Success" Then
        WScript.Quit
    End If


    Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SaveBiosSettings")


    strReturn = "error"
    For Each objItem in colItems
        ObjItem.SaveBiosSettings ";", strReturn
    Next


    WScript.Echo strRequest
    WScript.Echo " SaveBiosSettings: " + strReturn

    Can you guys please help me.. 

    Tuesday, May 29, 2018 12:30 PM

All replies

  • Can you use WMI explorer and verify if Lenovo_BIOSSetting in Root\WMI?  If it does not then you will not be able to use that script.

    This scripting is primarily geared towards ThinkPad, ThinkStation, and ThinkCentre products.  Idea products do not usually include WMI exposures.

    LawsonT

    Tuesday, May 29, 2018 3:07 PM
  • Do we have any Scripts that will work in IdeaCentre?
    Wednesday, May 30, 2018 3:20 AM
  • You did not say if you were able to find the WMI pieces I referenced above. If you did not find them then, no there are not any scripts that will do that. You may have to look at the actual BIOS update itself and see if there are any additional tools or features included. Again most of my experiences are with the Think products, so you will have to investigate some on your own. LawsonT
    Wednesday, May 30, 2018 3:44 AM
  • Hi LawsonT,

    Here's result when I tried to execute WMI query in Lenovo. Please let me know If I need to some other changes in Process.


    • Edited by JiteshKumar Wednesday, May 30, 2018 6:17 AM
    Wednesday, May 30, 2018 5:44 AM
  • Here's list of Settings which is in Lenovo

    Microsoft (R) Windows Script Host Version 5.812
    Copyright (C) Microsoft Corporation. All rights reserved.


    USB Support
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    USB Legacy Support
      current setting  = Enabled;[Optional:Enabled,Disabled]
      possible settings = 


    USB Enumeration Delay
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    USB Virtual KBC Support
      current setting  = Disabled;[Optional:Disabled,Enabled]
      possible settings = 


    SATA Controller
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Configure SATA as
      current setting  = AHCI;[Optional:AHCI,Intel(R) RST with Intel(R) Optane]
      possible settings = 


    Select Active Video
      current setting  = Auto;[Optional:IGD,PEG,Auto]
      possible settings = 


    Pre-Allocated Memory Size
      current setting  = 32MB;[Optional:32MB,64MB,128MB,256MB,512MB,1024MB]
      possible settings = 


    Total Graphics Memory
      current setting  = Maximum;[Optional:128MB,256MB,Maximum]
      possible settings = 


    Onboard Audio Controller
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Onboard Ethernet Controller
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Boot Agent
      current setting  = PXE;[Optional:Disabled,PXE]
      possible settings = 


    PXE IPV4 network stack
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    PXE IPV6 network stack
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Wireless LAN
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Card Reader
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    EIST Support
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Intel(R) Hyper-Threading Technology
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Intel(R) Virtualization Technology
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    VT-d
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Turbo Mode
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Intel(R) SGX Control
      current setting  = Software Controlled;[Optional:Disabled,Enabled,Software Controlled]
      possible settings = 


    Current State
      current setting  = Disabled;[Optional:Disabled,Enabled][Status:ShowOnly]
      possible settings = 


    After Power Loss
      current setting  = Power Off;[Optional:Power Off,Power On,Last State]
      possible settings = 


    Enhanced Power Saving Mode
      current setting  = Disabled;[Optional:Disabled,Enabled]
      possible settings = 


    Wake_on_LAN
      current setting  = Enabled;[Optional:Enabled,Disabled]
      possible settings = 


    Wake_Up_on_Alarm
      current setting  = Disabled;[Optional:Single Event,Daily Event,Weekly Event,Disabled]
      possible settings = 


    Alarm Time(HH:MM:SS)
      current setting  = [00:00:00][Status:ShowOnly]
      possible settings = 


    Alarm Date(MM/DD/YYYY)
      current setting  = [01/01/2016][Status:ShowOnly]
      possible settings = 


    Alarm Day of Week
      current setting  = Sunday;[Optional:Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday][Status:ShowOnly]
      possible settings = 


    Windows UEFI Firmware Update
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    POP Changeable by User
      current setting  = Yes;[Optional:No,Yes]
      possible settings = 


    Security Chip
      current setting  = Enabled;[Optional:Disabled,Enabled]
      possible settings = 


    Credential Guard
      current setting  = Disabled;[Optional:Disabled,Enabled]
      possible settings = 


    Boot Mode
      current setting  = Auto;[Optional:Auto,UEFI Only,Legacy Only]
      possible settings = 


    Boot Priority
      current setting  = Legacy;[Optional:UEFI,Legacy]
      possible settings = 


    Boot Up Num-Lock Status
      current setting  = On;[Optional:Off,On]
      possible settings = 


    Primary Boot Sequence
      current setting  = USB FDD:USB KEY:M.2 Drive:SATA 1:SATA 2:SATA 3:Network 1:USB HDD:USB CDROM:Other Device;[Excluded from boot order:Network 2:Network 3:Network 4]
      possible settings = 

    when I tried to execute the command line "

    cscript.exe %scriptroot%\Test\SetConfig.vbs SecureBoot Enable

    I was getting the Below Error Message


    SecureBoot,Enable;
    SetBiosSetting: Invalid Parameter



    • Edited by JiteshKumar Wednesday, May 30, 2018 11:20 AM
    Wednesday, May 30, 2018 11:19 AM
  • I do not see SecureBoot in your WMI output, which is why the script is throwing invalid parameter error. Try setting "Boot Mode" to "UEFI Only" instead.

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Wednesday, May 30, 2018 11:26 AM
  • Thanks Anton, Why is it not appearing in SecureBoot in WMI? how to resolve that issue any workaround .

    Yeah I have already changed the Boot Mode to UEFI.

    • Edited by JiteshKumar Wednesday, May 30, 2018 12:06 PM
    Wednesday, May 30, 2018 12:05 PM
  • This setting is not exposed via WMI - is it even available in tthe BIOS? If Inwere in your shoes, Inwould start by verifying that the script works and changing system config to UEFi only is the first step on the road to W10 complince / Secure Boot.

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Wednesday, May 30, 2018 12:10 PM
  • Yes it is available in BIOS. but when trying to execute the Scripts.It's not working as you said It wasn't available in WMI Output.
    Wednesday, May 30, 2018 12:18 PM
  • JiteshKumar,

    First, to address why you werent seeing any of this in WMI Explorer, make sure you are running WMI Explorer as administrator.  Also, in WMI Explorer, you will need to change the namespace from Root\CIMv2 to Root\WMI to search for the Lenovo_BIOSSetting path.

    Now that I see the output of your script, I agree with Anton, the SecureBoot setting is not exposed via WMI in the BIOS version you are running.  If Lenovo were to provide the SecureBoot setting at this point in time, they would implement this from a BIOS Update, which leads to my question.

    What BIOS Version are you running on these boxes?  In the change.txt log, (I downloaded the latest BIOS Version), it appears that they may have added OS Optimized Defaults and Secure Boot settings in O2TKT24A. The current BIOS Level today is O2TKT49A.  If you are below 24A, I would suggest to update to the latest version and see what your script returns.

    LawsonT

    Wednesday, May 30, 2018 2:11 PM
  • Thanks LawsonT, when I changed the namespace it executed the query successfully. Currently In Lenovo BIOS Version is O2TKT24A. I haven't added any extra Settings in this version.
    Thursday, May 31, 2018 3:52 AM
  • I would suggest to try updating the BIOS to the latest rev and see if any new settings become available.

    LawsonT

    Thursday, May 31, 2018 2:26 PM