PowerShell Script to Get BIOS Settings.

by phaniprasad918 at 2012-12-14 04:36:08

Hi all,

This is Phani. I need a script where I can get the BIOS Power Management details to check whether the Wake-on-LAN is Enabled or Disabled despite of the PC Company.

Thanks in advance.
by MattG at 2012-12-15 13:08:35
Hi Phani,

Unfortunately, what you want to accomplish is going to be vendor-specific. Fortunately, you can certainly use PowerShell to query vendor-specific WMI settings. For example, I’m running a Lenovo laptop and can query Lenovo bios setting with the following command from an administrator prompt:
PS C:\Windows\system32> Get-WmiObject -Class Lenovo_BiosSetting -Namespace 'ROOT\WMI' | ? { $_.CurrentSetting } | Sort-Object CurrentSetting | Format-Table CurrentSetting, InstanceName -AutoSize

CurrentSetting InstanceName
-------------- ------------
AdaptiveThermalManagementAC,MaximizePerformance ACPI\PNP0C14\1_14
AdaptiveThermalManagementBattery,Balanced ACPI\PNP0C14\1_15
AlwaysOnUSB,Enable ACPI\PNP0C14\1_3
AMTControl,Enable ACPI\PNP0C14\1_27
ATpModuleActivation,Enable ACPI\PNP0C14\1_60
BIOSPasswordAtReboot,Disable ACPI\PNP0C14\1_32
BIOSPasswordAtUnattendedBoot,Enable ACPI\PNP0C14\1_31
BIOSUpdateByEndUsers,Enable ACPI\PNP0C14\1_39
BluetoothAccess,Disable ACPI\PNP0C14\1_48
BootDeviceListF12Option,Enable ACPI\PNP0C14\1_64
BootDisplayDevice,LCD ACPI\PNP0C14\1_10
BootMode,Quick ACPI\PNP0C14\1_62
BootOrder,USBCD:USBFDD:ATAPICD0:HDD2:HDD0:HDD1:USBHDD:PCILAN ACPI\PNP0C14\1_65
BootOrderLock,Disable ACPI\PNP0C14\1_67
CDROMSpeed,Normal ACPI\PNP0C14\1_16
ComputraceModuleActivation,Enable ACPI\PNP0C14\1_61
CoreMultiProcessing,Enable ACPI\PNP0C14\1_25
CPUPowerManagement,Automatic ACPI\PNP0C14\1_17
DataExecutionPrevention,Enable ACPI\PNP0C14\1_41
eSATAPortAccess,Disable ACPI\PNP0C14\1_54
EthernetLANAccess,Enable ACPI\PNP0C14\1_44
EthernetLANOptionROM,Disable ACPI\PNP0C14\1_1
ExpressCardAccess,Disable ACPI\PNP0C14\1_52
FingerprintPasswordAuthentication,Enable ACPI\PNP0C14\1_36
FingerprintPredesktopAuthentication,Disable ACPI\PNP0C14\1_33
FingerprintReaderAccess,Disable ACPI\PNP0C14\1_59
FingerprintReaderPriority,External ACPI\PNP0C14\1_34
FingerprintSecurityMode,Normal ACPI\PNP0C14\1_35
FlashOverLAN,Disable ACPI\PNP0C14\1_40
FnCtrlKeySwap,Disable ACPI\PNP0C14\1_6
FnKeyLock,Disable ACPI\PNP0C14\1_7
GraphicsDevice,SwitchableGfx ACPI\PNP0C14\1_11
HardwarePasswordManager,Enable ACPI\PNP0C14\1_28
HyperThreadingTechnology,Enable ACPI\PNP0C14\1_26
IEEE1394Access,Disable ACPI\PNP0C14\1_51
IntegratedCameraAccess,Disable ACPI\PNP0C14\1_57
KeyboardBeep,Enable ACPI\PNP0C14\1_23
LockBIOSSetting,Disable ACPI\PNP0C14\1_29
LowBatteryAlarm,Enable ACPI\PNP0C14\1_21
MemoryCardSlotAccess,Disable ACPI\PNP0C14\1_55
MicrophoneAccess,Disable ACPI\PNP0C14\1_58
MinimumPasswordLength,Disable ACPI\PNP0C14\1_30
ModemAccess,Disable ACPI\PNP0C14\1_49
NetworkBoot,PCILAN ACPI\PNP0C14\1_66
OnByAcAttach,Disable ACPI\PNP0C14\1_19
OsDetectionForSwitchableGraphics,Disable ACPI\PNP0C14\1_12
PasswordBeep,Disable ACPI\PNP0C14\1_22
PCIExpressPowerManagement,Automatic ACPI\PNP0C14\1_18
PowerControlBeep,Enable ACPI\PNP0C14\1_20
PowerOnNumLock,Auto ACPI\PNP0C14\1_9
SATAControllerMode,AHCI ACPI\PNP0C14\1_24
SecurityChip,Inactive ACPI\PNP0C14\1_37
SmartCardSlotAccess,Enable ACPI\PNP0C14\1_56
SpeedStep,Enable ACPI\PNP0C14\1_13
StartupOptionKeys,Enable ACPI\PNP0C14\1_63
ThinkPadNumLock,Independent ACPI\PNP0C14\1_8
TouchPad,Automatic ACPI\PNP0C14\1_5
TrackPoint,Automatic ACPI\PNP0C14\1_4
TXTFeature,Disable ACPI\PNP0C14\1_38
UltrabayAccess,Enable ACPI\PNP0C14\1_53
USBBIOSSupport,Enable ACPI\PNP0C14\1_2
USBPortAccess,Enable ACPI\PNP0C14\1_50
VirtualizationTechnology,Enable ACPI\PNP0C14\1_42
VTdFeature,Enable ACPI\PNP0C14\1_43
WakeOnLAN,Disable ACPI\PNP0C14\1_0
WiMAXAccess,Disable ACPI\PNP0C14\1_46
WirelessLANAccess,Enable ACPI\PNP0C14\1_45
WirelessWANAccess,Disable ACPI\PNP0C14\1_47
As you can see, WakeOnLAN is disabled.

I hope this helps!
by phaniprasad918 at 2012-12-16 19:54:14
Hi MattG,

Thanks a lot for your reply. Could you please tell me where can I find Lenovo ThinkCentre M82 - AK2 Desktop’s WMI settings.
by MattG at 2012-12-17 04:26:36
Lenovo settings are in the ROOT\WMI namespace. You can list all the WMI classes in that namespace with the following command:
Get-WmiObject -Namespace 'ROOT\WMI' -List | Sort-Object Name