Users Guide

strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Establecer el valor de WakeUpOnLan solo cuando no sea ya '6' ("Activar
'*** para todas las tarjetas de interfaz de red")
if strPropValue <> 6 then
'***Establecerelnuevovalorparalapropiedadyguardarlainstancia
objInstance.Properties_.Item(strPropName).Value=6
objInstance.Put_
'***Sisepresentaalgúnerror,informaralusuario
IfErr.Number<>0Then
WScript.Echo"FallólaactivacióndeEncendidoenLAN."
EndIf
End If
'*** Subrutina que se utiliza para mostrar el uso correcto de la secuencia de comandos
Sub Usage()
Dim strMessage
strMessage = "Sintaxis incorrecta. Debe ejecutar: " & vbCRLF & _
"cscript.exe//nologoSampleWuOLEnable.vbs<nombre_del_sistema>"
WScript.Echo strMessage
End Sub)
Recuperacióndelaetiquetadeservicio,laetiquetadepropiedadylarevisióndelBIOS
AcontinuaciónsepresentaunVBScriptdemuestraquemostrarálaetiquetadepropiedad,laetiquetadeservicioylarevisióndelBIOSdeunclienteDell
OMCI.
'****************************************************
'*** 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"
'*** WQL Query to retrieve instances of Dell_SystemSummary
strWQLQuery = "SELECT * FROM " & strClassName & " WHERE " & _
strKeyName&"="&Chr(34)&strComputerName&Chr(34)
'*** Retrieve instances of Dell_Configuration class (there should only
'*** be 1 instance).
Set colInstances = GetObject("WinMgmts:{impersonationLevel=impersonate}//"&_
strComputerName&"/"&strNameSpace).ExecQuery(strWQLQuery,"WQL",
NULL)
'*** Use only first instance to retrieve asset tag, service tag, and BIOS
'*** version
For Each objInstance in colInstances
strMessage="AssetTag:"
strMessage=strMessage&objInstance.Properties_.Item
("AssetTag").Value
strMessage=strMessage&vbCRLF&"ServiceTag:"
strMessage=strMessage&objInstance.Properties_.Item
("ServiceTag").Value
strMessage=strMessage&vbCRLF&"BIOSVersion:"