Lenovo ThinkCentre M92 BIOS Windows Management Instrumentation Interface Deplo - Page 30

List all BIOS settings on a remote computer, Set a single BIOS setting on a remote computer

Page 30 highlights

strReturn = "error" For Each objItem in colItems ObjItem.SaveBiosSettings Wscript.Arguments(2)+";", strReturn Next WScript.Echo strRequest WScript.Echo " SaveBiosSettings: " + strReturn List all BIOS settings on a remote computer Use the sample scripts in the ZIP file as templates to list all BIOS settings and values on a remote computer. Syntax: cscript.exe ListAllRemote.vbs [Hostname] Example: cscript.exe ListAllRemote.vbs mattdev-c5 ' ' List all BIOS settings ' On Error Resume Next Dim colItems If WScript.Arguments.Count 1 Then WScript.Echo"ListAllRemote.vbs [hostname]" WScript.Quit End If strComputer = WScript.Arguments(0) Set objWMIService = GetObject("WinMgmts:" _ &"{ImpersonationLevel=Impersonate," _ &"authenticationLevel=pktPrivacy}!\\" _ & strComputer & "\root\wmi") Set colItems = objWMIService.ExecQuery("Select * from Lenovo_BiosSetting") For Each objItem in colItems If Len(objItem.CurrentSetting) > 0 Then Setting = ObjItem.CurrentSetting StrItem = Left(ObjItem.CurrentSetting, InStr( ObjItem.CurrentSetting, ",")-1) StrValue = Mid(ObjItem.CurrentSetting, InStr( ObjItem.CurrentSetting, ",")+1,256) WScript.Echo StrItem + " = " + StrValue End If Next Set a single BIOS setting on a remote computer Use the sample scripts in the ZIP file as templates to set a single BIOS setting on a remote computer. Syntax: cscript.exe SetConfigRemote.vbs [Item] [Value] [Hostname] Example: cscript.exe SetConfigRemote.vbs "Wake Up on LAN" Disabled mattdev-c5 ' ' Set specific BIOS Setting Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop 22

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36

Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
22
strReturn = "error"
For
Each objItem in colItems
ObjItem.SaveBiosSettings Wscript.Arguments(2)+";", strReturn
Next
WScript.Echo strRequest
WScript.Echo "
SaveBiosSettings: "
+ strReturn
List all BIOS settings on a remote computer
Use the sample scripts in the ZIP file as templates to list all
BIOS settings and values on a remote computer.
Syntax
:
cscript.exe
ListAllRemote.vbs [Hostname]
Example
:
cscript.exe
ListAllRemote.vbs mattdev-c5
’ List all BIOS settings
On
Error Resume Next
Dim colItems
If WScript.Arguments.Count <> 1 Then
WScript.Echo"ListAllRemote.vbs [hostname]"
WScript.Quit
End If
strComputer = WScript.Arguments(0)
Set
objWMIService
= GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate," _
&"authenticationLevel=pktPrivacy}!\\" _
& strComputer &
"\root\wmi")
Set
colItems = objWMIService.ExecQuery("Select * from
Lenovo_BiosSetting")
For
Each objItem in colItems
If Len(objItem.CurrentSetting) > 0 Then
Setting = ObjItem.CurrentSetting
StrItem = Left(ObjItem.CurrentSetting, InStr(
ObjItem.CurrentSetting, ",")-1
StrValue = Mid(ObjItem.CurrentSetting, InStr(
ObjItem.CurrentSetting,
",")+1
256
WScript.Echo StrItem
+ "
= "
+ StrValue
End If
Next
Set a single BIOS setting on a remote computer
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on a remote computer.
Syntax
:
cscript.exe
SetConfigRemote.vbs [Item] [Value]
[Hostname]
Example
:
cscript.exe
SetConfigRemote.vbs
Wake Up on LAN
Disabled
mattdev-c5
’ Set
specific BIOS Setting