Users Guide

'*** 检索 Dell_SMBIOSSettings '***类的实例(只能有 1 个实例)。
Set objInstance =GetObject("WinMgmts:{impersonationLevel=impersonate ,AuthenticationLevel=pktprivacy }//" &_ strComputerName & "/" &
strNameSpace & ":" & strClassName & "=" &_ Chr(34) & strKeyValue & Chr(34))
'*** ChassisIntrusionStatus 的值设置为"5" '***"清除"
'***设置该属性的新值并保存实例 objInstance.Properties_.Item(strPropName).Value = 5 objInstance.Put_
'*** 如果出现任何错误,让用户知道。
If Err.Number <> 0
Then WScript.Echo "Clearing Chassis Intrusion Status failed."
End If
'*** Sub 用于显示脚本的 '***正确用法
Sub Usage()
Dim strMessage
strMessage = "语法不正确。应运行:" & vbCRLF & _ "cscript.exe /nologo SampleChassisIntrusionClear.vbs <系统名称>" WScript.Echo strMessage
End Sub)
禁用所有警面信息
下面是禁用当检测到警报状况时在桌面上显示的信息框的示例 VBScript
Namespace: root\DellOMCI
Class Name: Dell_IndicationStaticValues
Instance 'Key' Value: Not Applicable to this example
Property Name: MaxDisplayNotifications
Property Value: 0 '**************************************************** '*** Name: SampleDisableAlertMessages.vbs
'*** Purpose: To disable the desktop message box for '***all alerts on a Dell OMCI client.
'***Usage: cscript.exe //nologo '***SampleDisableAlertMessages.vbs <systemname>'***
'*** 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. '**************************************************** Option Explicit
'*** Declare variables
Dim objWMIService
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim ColSystem
Dim objInstance
Dim strPropName
Dim strPropValue
'*** 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