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

Appendix, Sample, PowerShell, scripts, remote, management

Page 33 highlights

Appendix B. Sample PowerShell scripts for remote BIOS management The following PowerShell scripts are examples that can be used with management servers. Get all current BIOS settings Use the following script as a template to display all current BIOS settings on the local computer. gwmi -class Lenovo_BiosSetting -namespace root\wmi | ForEach-Object {if ($_.CurrentSetting -ne "") {Write-Host $_.CurrentSetting.replace To obtain the current BIOS settings from a remote computer on your network, replace test-pc with the computer name of the target computer in the following command. You will be prompted to enter the userid and password of the administrator-level account for the remote computer. gwmi -class Lenovo_BiosSetting -namespace root\wmi -ComputerName test-pc -credential (get-credential) | ForEach-Object {if ($_.CurrentSetting -ne "") {Write-Host $_.CurrentSetting.replace PS C:\> gwmi -class Lenovo_BiosSetting -namespace root\wmi -ComputerName test-pc -credential (get-credential) | ForEach-Object {if ($_.CurrentSetting -ne "") {Write-Host $_.CurrentSetting.replace cmdlet get-credential at command pipeline position 1 Supply values for the following parameters: Credential WakeOnLAN = Enable FlashOverLAN = Enable EthernetLANOptionROM = Enable HarddriveDMA = Enable WirelessLANandWiMAXRadios = On SerialPort = Disable SerialPortIO = 3F8 SerialPortIRQ = 4 ParallelPort = Enable ParallelPortMode = BiDirectional ParallelPortIO = 3BC ParallelPortIRQ = 7 ParallelPortDMA = 0 PCIINTA = 11 PCIINTB = 11 PCIINTC = 11 PCIINTD = 11 PCIINTE = 11 PCIINTF = 11 PCIINTG = 11 PCIINTH = 11 USBBIOSSupport = Enable AlwaysOnUSB = Disable TrackPoint = Automatic TouchPad = Automatic FnKeyLock = Disable © Copyright Lenovo 2008, 2012 25

  • 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

Appendix
B.
Sample
PowerShell
scripts
for
remote
BIOS
management
The
following
PowerShell
scripts
are
examples
that
can
be
used
with
management
servers.
Get
all
current
BIOS
settings
Use
the
following
script
as
a
template
to
display
all
current
BIOS
settings
on
the
local
computer.
¾
Command
!
JZPL
¿FODVV
/HQRYRB%LRV6HWWLQJ
¿QDPHVSDFH
URRW?ZPL
_
)RU(DFK¿2EMHFW
^LI ¶ÆB³&XUUHQW6HWWLQJ
¿QH µµ¹
^:ULWH¿+RVW ÆB³&XUUHQW6HWWLQJ³UHSODFH¶µ¼µ¼µ
° µ¹``
To
obtain
the
current
BIOS
settings
from
a
remote
computer
on
your
network,
replace
test-pc
with
the
computer
name
of
the
target
computer
in
the
following
command.
You
will
be
prompted
to
enter
the
userid
and
password
of
the
administrator-level
account
for
the
remote
computer.
¾
Command
!
JZPL
¿FODVV
/HQRYRB%LRV6HWWLQJ
¿QDPHVSDFH
URRW?ZPL
¿&RPSXWHU1DPH
WHVW¿SF
¿FUHGHQWLDO
¶JHW¿FUHGHQWLDO¹
_
)RU(DFK¿2EMHFW
^LI ¶ÆB³&XUUHQW6HWWLQJ
¿QH µµ¹
^:ULWH¿+RVW ÆB³&XUUHQW6HWWLQJ³UHSODFH¶µ¼µ¼µ
° µ¹``
¾
Sample
output
!
36
&²?!
JZPL
¿FODVV
/HQRYRB%LRV6HWWLQJ
¿QDPHVSDFH
URRW?ZPL
¿&RPSXWHU1DPH
WHVW¿SF
¿FUHGHQWLDO
¶JHW¿FUHGHQWLDO¹
_
)RU(DFK¿2EMHFW
^LI ¶ÆB³&XUUHQW6HWWLQJ
¿QH µµ¹
^:ULWH¿+RVW ÆB³&XUUHQW6HWWLQJ³UHSODFH¶µ¼µ¼µ
° µ¹``
FPGOHW
JHW¿FUHGHQWLDO
DW
FRPPDQG
SLSHOLQH
SRVLWLRQ
À
6XSSO\
YDOXHV
IRU
WKH
IROORZLQJ
SDUDPHWHUV²
&UHGHQWLDO
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