Bios Setup using WMI (WMI is missing)

Hi, I am trying to make changes to the bios using the information found here:
http://support.lenovo.com/en_US/detail.page?Legacy​DocID=MIGR-68488
However, on a refurb L430 that we just bought through the "http://outlet.lenovo.com/" site, the WMI class does not exist.  I am making the call from C#.  I also tried running the supplied sample scripts and they do not work either.  So then I checked   Computer -> Manage -> Services and Applications -> WMI Control -> Properties -> Security and browsed to Root/WMI and the class "Lenovo_BIOSElement" does not exist there.  The only class shown is "ms_409"
Is there an installer for the Lenovo WMI class?  Is this supposed to be present on all of the supported devices listed in the "Lenovo BIOS Setup using Windows Management Instrumentation Deployment Guide"?  Are the WMI calls no longer supported?  
Thanks
-Mike
Solved!
Go to Solution.

I think I got it working somehow...
I modified the C# method to use the class "Lenovo_BIOSSetting" instead of "Lenovo_BiosElement".
When running my executable, I first got access denied.  I reran it as administrator and was able to view all of the 80 management instances.  I then reran the script "ListAll.vbs" and now it is populating properly. 
WakeOnLAN = ACOnly
BootOrderLock = Disable

Similar Messages

  • Setting Bios Settings via WMI

    I wrote a script to change the Ownership Tag on the laptops, desktops, and workstations we have deployed at our site. Sadly it is kind of a mish-mash of models (8470p, 8560p, 8560w, Z420, Z600, ML 110, ML 350, 6000 Pro, 8200 Elite, and several others...a mish-mash). All of the laptops are running Windows 8.1 and all the desktops/workstations are running Windows Server 2012 R2. All the PCs are on a domain, and although I am not a domain admin, I am specifically set as a local admin on all PCs. I am having two issues: 1. I can set the Ownership Tag on my laptop both locally and remotely regardless of what I enter for a BIOS Setup password. The F10 Setup password IS SET on my laptop, and I get prompted for it when I press F10 during the POST. I don't know if it matters, but my laptop's BIOS version is 68ICF Ver. F.50. 2. My script does not work locally or remotely on a z420 (BIOS Ver J61 v03.85) running Server 2012 r2 even when I know I am using the right password. It consistently returns error code 6 (Access Denied). If I remove the BIOS setup password it will work both locally and remotely. I know Windows Firewall is configured to allow remote WMI. Here is my script:If Wscript.Arguments.Count = 2 Then
    strComputer = Wscript.Arguments.Item(0)
    strOwnerTag = Wscript.Arguments.Item(1)
    ' Get BIOS password from user
    Set oPwdCtl = CreateObject("hpPwdCtl.PasswordEdit")
    oPwdCtl.GetPassword _
    "Enter the Computer Setup Password:", strPassword
    Set objSWbemLocator = CreateObject _
    ("WbemScripting.SWbemLocator")
    Set objWMIService = objSWbemLocator.ConnectServer _
    (strComputer, "root\HP\InstrumentedBIOS")
    Set colItems = objWMIService.ExecQuery _
    ("SELECT * FROM HPBIOS_BIOSString", , 48)
    For Each objItem In colItems
    ' strResultMsg = strResultMsg & objItem.Name & _
    ' " : " & objItem.Value & vbCrLf
    If InStr(1, objItem.Name, "Owner") Then
    strName = objItem.Name
    End If
    Next
    ' Obtain an instance of the the class using
    ' a key property value.
    Set objShare = objWMIService.Get _
    ("HPBIOS_BIOSSettingInterface.InstanceName='ACPI\PNP0C14\0_0'")
    ' Obtain an InParameters object specific to the method.
    Set objInParam = _
    objShare.Methods_("SetBIOSSetting").InParameters.SpawnInstance_()
    ' Add the input parameters.
    objInParam.Properties_.Item("Name") = strName
    objInParam.Properties_.Item("Password") = strPassword
    objInParam.Properties_.Item("Value") = strOwnerTag
    ' Execute the method and obtain the return status.
    ' The OutParameters object in objOutParams
    ' is created by the provider.
    Set objOutParams = objWMIService.ExecMethod _
    ("HPBIOS_BIOSSettingInterface.InstanceName='ACPI\PNP0C14\0_0'", _
    "SetBIOSSetting", objInParam)
    ' List OutParams
    strResultMsg = strResultMsg & vbCrLf & "Result: " & _
    objOutParams.Return
    Wscript.Echo strResultMsg
    Else
    'Instruct on the proper use of the script
    Wscript.Echo "Target Hostname and/or Ownership Tag missing!" _
    & vbCrLf & "Usage: SetAssetTag <hostname> <asset tag>"
    End If   So, how do I get this to work on a Z420 running Server 2012 R2 when there is a password set, and NOT work on my laptop when an incorrect password is entered? What have I missed? EDIT:I should note that on some models the Ownership Tag is named "Enter Ownership Tag" while on other models it is simply "Ownership Tag". I suspect there are other variations, and that is why I search for "owner". I am aware that I can use the WQL LIKE operator (eg, SELECT * FROM HPBIOS_BIOSString WHERE name LIKE '%owner%') to find the tag but I was lazy and busy and not thinking...I'll likely edit it later. ____________________________________________________Just to help some others out who may find this thread later: To enable Remote WMI in Windows firewall, you can use this command from a DOS promptnetsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes  If you have admin rights on a remote PC, you can use WINRS to run the command on the remote PC (this is a snippet of VB code)"winrs -r:" & strComputer & " netsh advfirewall firewall set rule group=" & chr(34) & "Windows Management Instrumentation (WMI)" & chr(34) & " new enable=yes" For security reasosn you may want to disable Remote WMI when you are done working with the remote machine, so make sure to run that command again but with "enable=no".  Some very helpful tools for working with the HPBIOS WMI stuff are:WMI Explorer 2.0 (https://wmie.codeplex.com/)WMI Code Creator (https://www.microsoft.com/en-us/download/details.aspx?id=8572)HP Client Management InterfaceTechnical White Paper (http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf) And if you want a nice easy GUI editor for playing with code that is easily transferable to VBScript, I personally like Excel VBA. Just make sure to add a reference to the Microsoft WMI Scripting Library (https://technet.microsoft.com/en-us/library/ee156554.aspx).

    Ok, so I solved problem number 2. It turns out that the Z420 will not accept passwords encoded as keyboard scancodes. Instead they accept passwords encoded as UTF-16. So, if your setup password is abc123, the scancode is "<kbd/>1E302E020304". the utf-16 version of that is...wait for it...."<utf-16/>abc123" tada!! So since I have a mess of models, I'll need to modify my code to either ask the user to re-enter the password so it can be encoded as a scancode, or I can write a function that will convert the utf password that was entered to scancodes. I have not figured out how to pass a string to the hpPwdCtrl object and have it return a value. The documentation on the hpPwdCtl.PasswordEdit object is sketchy or nonexistant, but here's what I've figured out so far: 1. Using early bindingDim oPwdCtl As New hpPwdCtl.PasswordEditstrPassword = oPwdCtl.GetPassword("Enter the Setup Password:") 'keyboard scancode encoded passwordstrUTFPassword = oPwdCtl.GetPasswordAsUnicode(varLocale, "Enter the Setup Password:") I have no clue what varLocale does, but you must use an empty variable there. (varLocale was just my name for it...call your variable whatever you want, but make sure its empty.) 2. Using late bindingSet oPwdCtl = CreateObject("hpPwdCtl.PasswordEdit")oPwdCtl.GetPassword "Enter the Setup Password:", strPasswordoPwdCtl.GetPasswordAsUnicode varLocale, "Enter the Setup Password:", strUTFPassword Again you must have the empty variable for the unicode method. There is a method named GetPasswordAsScanCode but I can't get it to work with either early or late binding. I always get "The Remote Procedure Call Failed".  

  • E31 - Unable to set Bios values through WMI

    Dear All,
    I am trying to set Bios values on E31 through a VB Script using WMI in our lab. It is working on all the machines except one. It does not return an error while setting the value or saving it. But when I manually enter Setup, the values would not be set. No error is set in Event viewer.
    Manually modifying the value works.
    Machine type: E31 (2552CS4)
    Bios Version: 9SKT61AUS
    Values trying to set:
    Select Active Video=IGD
    Total Graphics Memory=128MB
    Multi-Monitor Support=Enabled
    Core Multi-Processing=Enabled
    etc.
    Command executed:
        ObjItem.SetBiosSetting Select Active Video,IGD;
        ObjItem.SetBiosSetting Multi-Monitor Support,Enabled;
        ObjItem.SetBiosSetting Core Multi-Processing,Enabled;
    Can anyone tell me what could be wrong with the machine. How it can be corrected.
    Thanks in advance.
    -Uttam

    Are those values (WMI commands) actually changing anything from what the defaults are?
    It's odd that you've seen it work correctly on other E31 systems but fail on only this one.  Is there something in the configuration that's unique to this system as compared to the other E31 systems that passed with no issue?
    In the failing scenario, which value(s) are not getting set correctly?

  • Using WMI alert for mirroring in Sql server 2012

    We are using mirroring in Sql Server 2012  and we are using WMI alerts for some of events such as Connection lost,Manual failover,...
    In alert definition we have set the followings:
    Type: WMI event alert
    NameSpace:
    \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
    Query: select * from DATABASE_MIRRORING_STATE_CHANGE where State = 6
    The alert is bing triggered correctly,but on email description instead of having meaningful explaination like 'Connection lost',We have the same query:
    Query: select * from DATABASE_MIRRORING_STATE_CHANGE where State = 6
    We have used the same implementation in our Sql Server 2008 servers and it is working fine.This mashine (Sql Server 2012) is a new mashine.
    I would appreciate if someone help me on this.AlsoI checked and 'Include body of e-mail in notification message' was already set.
    Thanks
    Aspet
    A.G

    Are you looking for alerting related to mirroring like below ?
    http://www.mssqltips.com/sqlservertip/1859/monitoring-sql-server-database-mirroring-with-email-alerts/
    http://technet.microsoft.com/en-us/library/cc966392.aspx
    Raju Rasagounder Sr MSSQL DBA

  • We have created two partitions in removable drive(USB). One of the partition is active and the other is hidden. We are trying to acess the hidden partition in Win PE 3.0 environment using WMI

    We have created two partitions in removable drive(USB). One of the partition is active and the other is hidden. We are trying to access the hidden partition in Win PE 3.0 environment using WMI. VBScript code snippet used to detect the partitions is given
    below:- 
    SetobjWMIService = GetObject("winmgmts:"_&
    "{impersonationLevel=impersonate}!\\"&
    strComputer & "\root\cimv2")
    SetcolDisks = objWMIService.ExecQuery
    Select * from Win32_LogicalDisk")
    It will return the partition which is active but fails to list the partition which is hidden. The same piece of code was supported on WinPE 2.0

    I am giving the complete code, may be you are able to understand better. We are using Win32_LogicalDisk to retrieves the complete information of all the drives (like C:, D:) including removable drives. 
    Function
    LocalDriveFound()
        strComputer =
    SetobjWMIService = GetObject("winmgmts:"_
    "{impersonationLevel=impersonate}!\\"&
    strComputer & "\root\cimv2")
    SetcolDisks = objWMIService.ExecQuery
    "Select * from Win32_LogicalDisk")
    ForEachDiskDrive
    IncolDisks
            DriveLetter = Left(DiskDrive.Name,1)
            DriveType = DiskDrive.DriveType
            VolumeName = DiskDrive.VolumeName
            WScript.echo Driveletter &
    "|"& Drivetype &
    "|"&VolumeName
    SelectCaseDriveType
    Case2 ,3  
    'Fixed or removable
    If(VolumeName=USBVolumeName)
    Then
    If(DriveLetter<>
    "Z")
    Then
                        ChangeDriveLetterWithMountvol DriveLetter,
    "Z"
    EndIf
                    bIsLocal=
    True
    EndIf 
    If(VolumeName=USBRootName)
    Then
    If(DriveLetter<>
    "Y")
    Then
                        ChangeDriveLetterWithMountvol DriveLetter,
    "Y"
    EndIf
                    bIsLocal=
    True
    EndIf 
    CaseElse
    EndSelect
    Next
    SetDrives =
    Nothing
    SetFileSystemObject =
    Nothing
    End
    Function

  • Is it possible to use WMI in Java

    hi,
    Is it possible to use WMI in java.We can use C# code to fetch Windows information using WMI,but is it possible to do the same in Java?

    One easy solution is to generate a vbscript, launch it and capture the output.
    Example at [http://www.rgagnon.com/javadetails/java-0580.html]
    ok, it's ugly but unless you want to go with JNI then it's worth a look.
    Bye.
    RG.

  • Reading hyper-v pass-through disks using WMI?

    How do I read pass-through disks for a guest VM from a Hyper-V using WMI? I'd like to read the pass-through disks that are available to a guest VM using the below mentioned ways:
    1. Add a disk to Hyper-V server, take it offline and assign it as a physical disk to VM
    2. Configure iSCSI initiator in guest VM to get a disk directly from storage array
    3. Use VFC to export a fiber channel lun to guest VM directly.
    Thanks/Hem

    You had another post with very similar questions, and I replied to it.  A broad answer is to use PowerShell as it does most, if not all, of the WMI work for you.  If you are having issues, it would be helpful for you to post specific questions
    about the issues you are seeing.  If they are scripting questions, you would reach more scripting experts in the Scripting Guys forum (http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG). 
    And you can go to the scripting gallery (http://gallery.technet.microsoft.com/) to find examples of many, many different things.
    .:|:.:|:. tim

  • How can I add roles or features with using WMI?

    Can I add features in Windows server 2008/2012 with using WMI? I found only how to see installed features, but can`t found anything in my question. Can anybody help?

    Hi,
    I agree with Ed’s suggestion. Just in addition, you can install roles, role services, or features via
    Install-WindowsFeature PowerShell cmdlets. Please refer to following TechNet article and check if can help you.
    Install-WindowsFeature
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu

  • Use WMI to Associate win32_SerialPort device with win32_LogicalDrive mapping

    Hi,
    My c# application requires to flash a micro-controller, which has been configured as a removable device and is connectable by means of a Virtual Com Port.
    So, I need to recognise the volume label of the mapped drive and perform the flash using a simple file copy.
    The problem is that some of the micro-controllers produce slightly different volume labels making it difficult to identify all possible cases via string comparison.
    I know how to retrieve drive info for removable devices using DriveInfo.GetDrives(). This gives me the drive letter and the volume label
    removableDriveList = (List<RemovableDrive>)DriveInfo.GetDrives()
            .Where(d => d.DriveType == DriveType.Removable)
            .Select(s => new RemovableDrive
                    Drive = s.Name,
                    Label = s.VolumeLabel
                }).ToList();
     I know how to detect the com port and recognisable description of the development boards using WMI to query Win32_SerialPorts.
    ManagementObjectCollection collection;
    using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_SerialPort"))
            collection = searcher.Get();
    var removableDevices = from ManagementObject x in collection
        where x.Properties["Name"].Value.ToString().Contains("MyManufacturer")
        select x;
        portName = (String)(removableDevices.First().GetPropertyValue("DeviceID"));
    However, I can't associate the virtual com port with the drive mapping. I want to be able to say, this device with ID COM7, manufacturer "MyManufacturer", matches drive mapping "I:\My_Microcontroller".
    I noticed (from device manager properties) that they both have the same container ID and are derived from the same usb controller, however I don't know how to access the this information from each child using WMI. Is this possible?
    Thanks

    Hello Marcpolo,
    I move it to the desktop forum since it is more related with Windows Management Instrumentation development.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Use wmi methods with powershell to export packages

    I'm looking for a way to export packages from a ConfigMgr 2012 ( NOT SP1 ) instance using wmi and powershell. I am aware of the wmi classes under the namespace 'root\sms\XYZ_Site' but I can't find any classes with an 'export' method. 
    ( Please don't tell me to load the SP1 module )
    Many thanks! 

    Hi,
    Have you figured this out?
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to get numeric information about system performance using WMI calls?

    Hello everyone,
    I'll make the question summarized for your convenience. I want to achieve the following task:
    -To be able to measure system performance over a sustained period of time.
    The way I intend to tackle that task is by doing the following:
    -To use WMI calls to get system performance data in a numeric and/or a percentage form. (RAM utilization, CPU utilization, Power state [active/idle]). 
    The information I am trying to get is EXACTLY the information you can see in Task Manager under Performance tab. 
    Please help. If you think there is a better way to do this than using WMI calls, I couldn't be more glad to take your advice and apply it!!
    Thanks in advance!
    Ray

    There is a better way.
    Use PDH function calls. This gets you as close as you can get to the performance counters provided by the operating system.
    Read more about it here.
    Examples found here.
    Codeproject example here and
    here

  • Get number of active instances for an orchestration using WMI

    I would like to get number of active, ready to run and dehydrated instances for an orchestration in my master orchestration. How can I do this using WMI?
    Thanks in advance!!

    I have done it recently...its quite simple...
    You can use System.Management in a helper library and create a helper method to implement this ->
    int instanceCount = 0;
    ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\MicrosoftBizTalkServer", "SELECT * FROM MSBTS_ServiceInstance WHERE ServiceName='<name of your orchestration>'");
    foreach (ManagementObject queryObj in searcher.Get())
    //Count for Active, Ready To Run and Dehydrated
    if (queryObj["ServiceStatus"].ToString() == "1" || queryObj["ServiceStatus"].ToString() == "2" | queryObj["ServiceStatus"].ToString() == "8")
    instanceCount = instanceCount + 1;
    return instanceCount;
    You can pass your orchestration name as a parameter to this method. Additionally you can modify the if conditions to include/exclude instance status.
    Make sure to verify the syntax before you use it!!

  • Disable SCCM Task Sequence Using WMI

    Hello everyone,
    So I'm attempting to use WMI/SDK to disable a task sequence.  I've dug for a method to do it, but am not having any luck.  I am aware of the Disable-CMTaskSequence Cmdlet, but I really wanting to find the WMI method, assuming one exists. 
    I've used the WMI Code Creator to browse the classes with methods and of the 99 available, I can't find any that seem to fit.
    If anyone has any ideas where I might look, then that would be great.  If not, I'll integrate PS into my solution, but I was hoping to keep everything to using .Net/SDK/WMI without any PS integration.
    Thanks!

    Hi,
    I don't understand why you don't want to use the cmdlet?
    I'm not a big fan of the native cmdlets either, but when they work, they do save you a lot of work going the WMI route.
    If, for whatever reason, you really want to use WMI, then have a look at SMS_TaskSequencePackage. You have to then change the property ProgramFlags via a bitwise operation. In this case it's Bit 12.
    Don't try to hardcode the value, that might work, but is a wrong way to go. Have a look at one of my previous articles where I show a similar thing on SMS_Program :
    http://www.david-obrien.net/2014/01/24/convert-configmgr-applications-packages-powershell/
    Hope that helps!
    My blog on ConfigMgr automation: www.david-obrien.net | me on Twitter: @david_obrien Please remember to mark the post(s) that helped you resolve the issue (even if it was your own)

  • Getting product state for Anti Virus using WMI.

    Hi All,
    I have seen lot on blogs and discussion on productstate for AV, AS and FW. But none of them give the complete information of product state.
    Do MSDN has any link that explains the product state completely. Or any relevant link for this.
    Moreover pre Vista os using WMI we can find the version of AS, AV ans FW, but in post Vista OS WMI does not provide the information of version of the product so how we can achieve this in post Vista os.

    Have you looked at this?
    https://msdn.microsoft.com/en-us/library/jj155489%28v=vs.85%29.aspx
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK.

  • How to use WMI to query to distinguish legacy and UEFI mode Windows?

    How to use WMI to query to distinguish legacy and UEFI mode Windows?

    This document covers requirements for UEFI support.
    http://msdn.microsoft.com/en-us/windows/hardware/gg463144.aspx
    One of the requirements seems to be ACPI. The Win32_BIOS class of WMI has a BIOSCharacteristics property that indicates if ACPI is supported. See this link for properties exposed by Win32_BIOS:
    http://msdn.microsoft.com/en-us/library/aa394077(v=VS.85).aspx
    There is a PowerShell example showing how to get this information at the bottom. You will need to study the document in the first link to see what else is required.
    Richard Mueller - MVP Directory Services

Maybe you are looking for

  • How do i get itunes on my new laptop without erasing all the songs on my ipod??

         Well my old laptop had a short in it and everytime you went to open it the screen would go blank. I went to get if fixed but the guy said they couldn't fix it. So I got a new laptop and now I don't know how to download itunes on my computer with

  • Need help on Data level security in OBIEE

    Hi All, Currently there are for few users who are accessing OBIEE dashboard. Here each user is responsible for 2 or 3 regions. Requirement: User wants there should be 2 dashboards First and Second. When a user login he should see the data for only th

  • Movie Rental Cancel

    I used iTunes on my iPad to download Ninja Assassin as a rental. I was unable to find a significantly strong connection to finish. I re-rented the movie on my computer which had a significantly strong connection. I moved the movie to my iPad and watc

  • What does this icon mean? HELP PLEASE

    Everytime i play a song in my ipod on the right corner there is a symbol its like two arrows going opposite of eachother in a circle what does it mean?

  • Is there an iPad app so that I can remotely update my blog site?

    I use iWeb to blog, not blogger or wordpress.  I know that there are iPad apps for those sites so that blogs can be updated when away from the computer...is there an app that works specifically with iWeb?