Users Guide
strNameSpace & ":" & strClassName & "=" &_ Chr(34) & strKeyValue & Chr(34))
'*** Set the value of ChassisIntrusionStatus to'5' '***("Clear")
'***Set the new value for the property and save the instance objInstance.Properties_.Item(strPropName).Value = 5 objInstance.Put_
'*** If any errors occurred, let the user know.
If Err.Number <> 0
Then WScript.Echo "Clearing Chassis Intrusion Status failed."
End If
'*** Sub used to display the correct usage of the '***script
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _ "cscript.exe /nologo SampleChassisIntrusionClear.vbs <systemname>" WScript.Echo
strMessage
End Sub
(名称空间:root\DellOMCI
类名:Dell_SMBIOSsettings
实例"键"值:0
属性名称:ChassisIntrusionStatus
属性值:5 '**************************************************** '*** 名称:SampleChassisIntrusionClear.vbs
'*** 目的:清除 Dell OMCI 客户端上的机箱侵入状态。
'*** 用法:cscript.exe //nologo SampleChassisIntrusionClear.vbs <系统名称>
'***
'*** 此示例脚本只是一个示例,'***未经测试,Dell 也不作任何'***担保;Dell 对相关的'***责任概不负责。Dell '*** 对该脚本不提供任何技术'***支持。有关 WMI'*** 脚本
的详情,请参阅适用的 Microsoft '***说明文件。'*************************************************** 选项显式
'*** 声明变量
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPropValue
'*** 确认使用了正确的可执行文件运行 '***脚本并且所有参数均已传递。
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _ (Wscript.Arguments.Count < 1) Then
Call Usage()
WScript.Quit
End If
'*** 初始化变量
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SMBIOSsettings"
strKeyValue = "0"
strPropName = "ChassisIntrusionStatus"










