Set A Supervisor Password On A Remote 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 = "pap," + WScript.Arguments(0) + "," + WScript.Arguments(1) + "," +
WScript.Arguments(2) + ";"
strComputer = "LOCALHOST"
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate}!\\" & strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SetBiosPassword")
strReturn = "error"
For Each objItem in colItems
ObjItem.SetBiosPassword strRequest, strReturn
Next
WScript.Echo " SetBiosPassword: "+ strReturn
Set a supervisor password on a remote computer when a supervisor
password exists
Use the sample scripts in the ZIP file as templates to set the supervisor password on a remote computer
when a supervisor password exists.
Note: You cannot set a supervisor password if one does not already exist.
Syntax: cscript.exe SetSupervisorPasswordRemote.vbs [Old Password]
[New Password] [encoding] [Hostname]Example: cscript.exe SetSupervisorPasswordRemote.vbs oldpass newpass
ascii,us mattdev-c5
'
' Update Admnistrator Password
'
On Error Resume Next
Dim colItems
If WScript.Arguments.Count <> 4 Then
WScript.Echo "SetSupervisorPasswordRemote.vbs [old Password]
[new Password] [encoding] [hostname]"
WScript.Quit
End If;
strRequest = "pap," + 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_SetBiosPassword")
strReturn = "error"
For Each objItem in colItems
ObjItem.SetBiosPassword strRequest, strReturn
Next
WScript.Echo " SetBiosPassword: "+ strReturn
' Change as needed.
Appendix A. Sample Visual Basic scripts for configuring BIOS settings
23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents