Lenovo ThinkPad T420 (English) BIOS Setup using Windows Management Instrumenta - Page 28

settings, remote, computer, single, setting

Page 28 highlights

WScript.Echo strRequest WScript.Echo " SaveBiosSettings: " + strReturn List all BIOS settings on the 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 WakeOnLAN Disable mattdev-c5 ' ' Set specific BIOS Setting ' On Error Resume Next Dim colItems If WScript.Arguments.Count 3 Then 20 Lenovo BIOS Setup using Windows Management Instrumentation Deployment Guide

  • 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
  • 37
  • 38
  • 39
  • 40

:6FULSW³(FKR
VWU5HTXHVW
:6FULSW³(FKR µ
6DYH%LRV6HWWLQJV² µ
½
VWU5HWXUQ
List
all
BIOS
settings
on
the
remote
computer
Use
the
sample
scripts
in
the
ZIP
±le
as
templates
to
list
all
BIOS
settings
and
values
on
a
remote
computer.
Syntax
:
FVFULSW³H[H
/LVW$OO5HPRWH³YEV
>+RVWQDPH@
Example
:
FVFULSW³H[H
/LVW$OO5HPRWH³YEV
PDWWGHY¿FÂ
´
´
/LVW
DOO
%,26
VHWWLQJV
´
2Q
(UURU
5HVXPH
1H[W
'LP
FRO,WHPV
,I
:6FULSW³$UJXPHQWV³&RXQW
¾!
À
7KHQ
:6FULSW³(FKR µ/LVW$OO5HPRWH³YEV
>KRVWQDPH@µ
:6FULSW³4XLW
(QG
,I
VWU&RPSXWHU
°
:6FULSW³$UJXPHQWV¶±¹
6HW
REM:0,6HUYLFH
°
*HW2EMHFW¶µ:LQ0JPWV²µ
B
·µ^,PSHUVRQDWLRQ/HYHO°,PSHUVRQDWH¼µ
B
·µDXWKHQWLFDWLRQ/HYHO°SNW3ULYDF\`¸??µ
B
·
VWU&RPSXWHU · µ?URRW?ZPLµ¹
6HW
FRO,WHPV
°
REM:0,6HUYLFH³([HF4XHU\¶µ6HOHFW
º
IURP
/HQRYRB%LRV6HWWLQJµ¹
)RU
(DFK
REM,WHP
LQ
FRO,WHPV
,I
/HQ¶REM,WHP³&XUUHQW6HWWLQJ¹
!
±
7KHQ
6HWWLQJ
°
2EM,WHP³&XUUHQW6HWWLQJ
6WU,WHP
°
/HIW¶2EM,WHP³&XUUHQW6HWWLQJ¼
,Q6WU¶2EM,WHP³&XUUHQW6HWWLQJ¼ µ¼µ¹
¿
À¹
6WU9DOXH
°
0LG¶2EM,WHP³&XUUHQW6HWWLQJ¼
,Q6WU¶2EM,WHP³&XUUHQW6HWWLQJ¼ µ¼µ¹
½
À¼
ÁÂù
:6FULSW³(FKR
6WU,WHP
½µ
°µ
½
6WU9DOXH
(QG
,I
1H[W
Set
a
single
BIOS
setting
on
a
remote
computer
Use
the
sample
scripts
in
the
ZIP
±le
as
templates
to
set
a
single
BIOS
setting
on
a
remote
computer.
Syntax
:
FVFULSW³H[H
6HW&RQúJ5HPRWH³YEV
>,WHP@
>9DOXH@
>+RVWQDPH@
Example
:
FVFULSW³H[H
6HW&RQúJ5HPRWH³YEV
:DNH2Q/$1
'LVDEOH
PDWWGHY¿FÂ
´
´
6HW
VSHFLúF
%,26
6HWWLQJ
´
2Q
(UURU
5HVXPH
1H[W
'LP
FRO,WHPV
,I
:6FULSW³$UJXPHQWV³&RXQW
¾!
Ä
7KHQ
20
Lenovo
BIOS
Setup
using
Windows
Management
Instrumentation
Deployment
Guide