Set A Supervisor Password On The Local Computer When A Supervisor Password Exists - Lenovo ThinkPad T400 Deployment Manual

Bios setup using windows management instrumentation deployment guide
Hide thumbs Also See for ThinkPad T400:
Table of Contents

Advertisement

strRequest = WScript.Arguments(0) + "," + WScript.Arguments(1) + "," +
WScript.Arguments(2) + ";"
strComputer = WScript.Arguments(3)
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate," _
&"authenticationLevel=pktPrivacy}!\\" _
& strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SetBiosSetting")
For Each objItem in colItems
ObjItem.SetBiosSetting strRequest, strReturn
Next
WScript.Echo strRequest
WScript.Echo " SetBiosSetting: " + strReturn
If strReturn <> "Success" Then
WScript.Quit
End If
Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SaveBiosSettings")
strReturn = "error"
For Each objItem in colItems
ObjItem.SaveBiosSettings WScript.Arguments(2) + ";", strReturn
Next
WScript.Echo strRequest
WScript.Echo " SaveBiosSettings: " + strReturn
Set a supervisor password on the local computer when a supervisor
password exists
Use the sample scripts in the ZIP file as templates to set a supervisor password on the local computer when
a supervisor password exists.
Note: You cannot set a supervisor password if one does not already exist.
Syntax: cscript.exe SetSupervisorPassword.vbs [Old Password] [New Password]
[encoding]
Example: cscript.exe SetSupervisorPassword.vbs oldpass newpass ascii,us
'
' Update Admnistrator Password
'
On Error Resume Next
Dim colItems
If WScript.Arguments.Count <> 3 Then
WScript.Echo "SetSupervisorPassword.vbs [old Password] [new Password]
[encoding]" WScript.Quit
End If
22
Lenovo BIOS Setup using Windows Management Instrumentation Deployment Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents