Users Guide

'***PrüfenSie,obdierichtigeausführbareDateizurAusführung'***desScriptsverwendetwurdeundoballeParameterweitergegebenwurden.
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count < 1) Then
Call Usage()
WScript.Quit
End If
'*** Variablen initialisieren
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_IndicationStaticValues"
strPropName = "MaxDisplayNotifications"
'*** Stellen Sie eine Verbindung zum DellOMCI-Namespace Set objWMIService =GetObject("winmgmts:{impersonationLevel=impersonate," &_
"AuthenticationLevel=pktprivacy}\\" & strComputerName & "\" &_ strNameSpace) her
'*** Instanzen der '***Dell_IndicationStaticValues-Klasse abrufen (es sollten 16 Instanzen vorhanden sein einefürjedenWarnungstyp).
Set ColSystem=objWMIService.execquery ("Select * from " & strClassName)
For each objInstance in ColSystem
'***DenWertfürMaxDisplayNotificationsauf'0'einstellen'***DenneuenWertfürdieEigenschafteinstellenunddieInstanzspeichern
objInstance.Properties_.Item(strPropName).Value = 0 objInstance.Put_ Next
'*** Sollten Fehler aufgetreten sein, muss der Benutzer benachrichtigt werden.
If Err.Number <> 0
WScript.Echo "The change to the property failed."
End If
'*** Sub verwendet, um die richtige Verwendung des '***Scripts anzuzeigen
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _ "cscript.exe /nologo SampleDisableAlertMessages.vbs <Systemname>" WScript.Echo
strMessage
End Sub)
Remote-System-Herunterfahren
ImFolgendenisteinBeispielvonVBScriptaufgeführt,daseinenDell™OMCI-Client im Remote-Zugriffherunterfährt.
'****************************************************
'*** Name: SampleShutdown.vbs
'*** Purpose: To shut down a Dell™ OMCI client.
'*** Usage: cscript.exe //nologo SampleShutdown.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 strNameSpace
Dim strComputerName
Dim strClassName
Dim strPropValue
Dim objInstance
Dim ObjOutParam
Dim strMethod
'*** Check that the right executable was used to run the script
'*** and that all parameters were passed