Users Guide

'*** Retrieve the instance of Dell_SMBIOSSettings class (there should
'*** only be 1 instance).
'*** (检索 Dell_SMBIOSSettings 类示例
'*** (只能有 1 个示例)。)
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Set the value of WakeUpOnLan only if it is not already '6' ("Enable
'*** for all NICs")
'*** (只有不为 '6' 时设置 WakeUpOnLan 值(“启用
'*** 所有 NICs)
if strPropValue <> 6 then
'***Setthenewvalueforthepropertyandsavetheinstance
'***(设置新属性值并保存示例)
objInstanceProperties_.Item(strPropName).Value = 6
objInstance.Put_
'***Ifanyerrorsoccurred,lettheuserknow
'***(如果出现任何错误,让用户知道)
If Err.Number <> 0 Then
WScript.Echo"EnablingWakeUpOnLanfailed."
EndIf
End If
'*** Sub used to display the correct usage of the script
'*** (Sub 用于显示脚本的正确用法)
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. 用户应运行:" & vbCRLF & _
"cscript.exe//nologoSampleWuOLEnable.vbs<系统名称>"
WScript.Echo strMessage
End Sub
索服务标签资产标签BIOS
'**********************************************************************
'*** Name: SampleSystemSummary.vbs
'*** (名称:SampleSystemSummary.vbs)
'*** Purpose: To display asset tag, service tag, and BIOS revision of
'*** a Dell OMCI client.
'*** (目的:要显示财产标签、服务标签和
'*** Dell OMCI 客户机 BIOS 修订。)
'*** Usage: cscript.exe //nologo SampleSystemSummary.vbs <systemname>
'*** (用法:cscript.exe //nologo SampleSystemSummary.vbs <系统名称>)
'***
'*** 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 说明文件。)
'**********************************************************************
Option Explicit
'*** Declare variables
'*** (声明变量)
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim colInstances
Dim objInstance
Dim strWQLQuery
Dim strMessage
Dim strKeyName
'*** Check that the right executable was used to run the script
'*** and that all parameters were passed
'*** (检查使用正确的可执行文件运行脚本,
'*** 且所有参数都通过验证)
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count<1)Then
CallUsage()
WScript.Quit
End If