Users Guide

'*** Initialize variables
'*** (初始化变量)
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SystemSummary"
strKeyName = "Name"
'*** WQL Query to retrieve instances of Dell_SystemSummary
'*** (WQL 查询检测 Dell_SystemSummary 示例)
strWQLQuery = "SELECT * FROM " & strClassName & " WHERE " & _
strKeyName&"="&Chr(34)&strComputerName&Chr(34)
'*** Retrieve instances of Dell_Configuration class (there should only
'*** be 1 instance).
'*** (检测 Dell_配置类示例
'*** (只能有 1 个示例)。)
Set colInstances = GetObject("WinMgmts:{impersonationLevel=impersonate}//"&_
strComputerName&"/"&strNameSpace).ExecQuery(strWQLQuery,"WQL",
NULL)
'*** Use only first instance to retrieve asset tag, service tag, and BIOS
'*** version
'*** (仅使用第一个示例检索资产标签、服务标签和 BIOS
'*** 版本)
For Each objInstance in colInstances
strMessage="AssetTag:"
strMessage=strMessage&objInstance.Properties_.Item
("AssetTag").Value
strMessage=strMessage&vbCRLF&"ServiceTag:"
strMessage=strMessage&objInstance.Properties_.Item
("ServiceTag").Value
strMessage=strMessage&vbCRLF&"BIOSVersion:"
strMessage=strMessage&objInstance.Properties_.Item
("BIOSVersion").Value
ExitFor
Next
'*** Display the results
'*** (显示结果)
WScript.Echo strMessage
'*** Sub used to display the correct usage of the script
'*** (Sub 用于显示脚本的正确用法)
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. 用户应该运行:" & vbCRLF & _
"cscript.exe//nologoSampleSystemSummary.vbs<系统名称>"
WScript.Echo strMessage
End Sub
更改 BIOS
'**********************************************************************
'*** Name: SampleBIOSPwd.vbs
'*** (名称:SampleBIOSPwd.vbs)
'*** Purpose: To change the BIOS password on a Dell OMCI client.
'*** (目的:更改 Dell OMCI 客户机上的 BIOS 密码。)
'*** Usage: cscript.exe //nologo SampleBIOSPwd.vbs <systemname> "<old
'*** pwd> space <new pwd>"
'*** (用法:cscript.exe //nologo SampleBIOSPwd.vbs <系统名称> "<old
'*** pwd> space <new pwd>")
'***
'*** This sample script is provided as an example only, and has not been
'*** tested, nor is warranted in any way by Dell; Dell disclaims any
'*** liability in connection therewith. Dell provides no technical
'*** support with regard to such scripting. For more information on WMI
'*** scripting, refer to applicable Microsoft documentation.
'*** (该样本脚本仅作为示例提供,未经过
'*** 测试,也没有 Dell 任何形式的保证;因此 Dell 否认对其承担
'*** 任何连接义务。 Dell 对该脚本不提供
'*** 任何技术支持。 关于 WMI
'*** 脚本的更多信息,请参阅相关的 Microsoft 说明文件。)
'**********************************************************************
'*** Declare variables
'*** (声明变量)
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPwd