Users Guide

'*** Initialize variables
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_IndicationStaticValues"
strPropName = "MaxDisplayNotifications"
'*** Establish a connection to the DellOMCI namespace Set objWMIService =GetObject("winmgmts:{impersonationLevel=impersonate," &_
"AuthenticationLevel=pktprivacy}\\" & strComputerName & "\" &_ strNameSpace)
'*** Retrieve the instances of '***Dell_IndicationStaticValues class (there should be 16 instances one for each alert type).
Set ColSystem=objWMIService.execquery ("Select * from " & strClassName)
For each objInstance in ColSystem
'*** Set the value of MaxDisplayNotifications to'0' '*** Set the new value for the property and save the instance objInstance.Properties_.Item
(strPropName).Value = 0 objInstance.Put_ Next
'*** If any errors occurred, let the user know.
If Err.Number <> 0 Then
WScript.Echo "The change to the property 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 SampleDisableAlertMessages.vbs <systemname>" WScript.Echo
strMessage
End Sub
(名称空间:root\DellOMCI
类名:Dell_IndicationStaticValues
实例""值:不适用于此示例
属性名称:MaxDisplayNotifications
属性值:0 '**************************************************** '*** 名称:SampleDisableAlertMessages.vbs
'*** 目的:禁用 Dell OMCI 客户端上 '***所有警报的桌面信息框。
'***用法:cscript.exe //nologo '***SampleDisableAlertMessages.vbs <系统名称>'***
'*** 此示例脚本只是一个示例,'***未经测试,Dell 也不作任何'***担保;Dell 对相关的'***责任概不负责。Dell 对该脚本不提供'*** 任何技术支持。'*** 有关 WMI 脚本的详
情,请参阅适用的 ***Microsoft 说明文件。'**************************************************** 选项显式
'*** 声明变量
Dim objWMIService
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim ColSystem
Dim objInstance
Dim strPropName
Dim strPropValue
'*** 确认使用了正确的可执行文件运行 '***脚本并且所有参数均已传递
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _