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_SMBIOSsettings"
strKeyValue = "0"
strPropName = "WakeupOnLan"
'*** Instanz der Dell_SMBIOSSettings-Klasse abrufen (es sollte
'*** nur 1 Instanz vorhanden sein).
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'***DenWertfürWakeUpOnLannurdanneinstellen,wennernichtbereits'6'ist("Füralle
'*** NICs aktivieren")
If strPropValue <> 6 Then
'***DenneuenWertfürdieEigenschafteinstellenunddieInstanzspeichern
objInstance.Properties_.Item(strPropName).Value=6
objInstance.Put_
'***SolltenFehleraufgetretensein,mussderBenutzerbenachrichtigtwerden
IfErr.Number<>0
WScript.Echo"EnablingWakeUpOnLanfailed."
EndIf
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SampleWuOLEnable.vbs<Systemname>"
WScript.Echo strMessage
End Sub)
Service-Tag-Nummer, Systemkennnummer und BIOS-Revision abrufen
ImFolgendenisteinBeispielvonVBScriptaufgeführt,dasdieSystemkennnummer,Service-Tag-Nummer und BIOS-Revision eines Dell OMCI-Clients anzeigt.
'****************************************************
'*** Name: SampleSystemSummary.vbs
'*** Purpose: To display asset tag, service tag, and BIOS revision of
'*** a Dell OMCI client.
'*** Usage: cscript.exe //nologo SampleSystemSummary.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 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
'*** Initialize variables
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SystemSummary"
strKeyName = "Name"