Users Guide
objInstance.Put_
'***Ifanyerrorsoccurred,lettheuserknow
'***(Avisaalusuariosiocurrealgúnerror)
IfErr.Number<>0Then
WScript.Echo"SettingPXEonnextrebootfailed."
EndIf
End If
'*** Sub used to display the correct usage of the script
'*** (Subrutina utilizada para mostrar el uso correcto de la secuencia de comandos)
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _
"cscript.exe//nologoSampleForcePXE.vbs<nombredelsistema>"
WScript.Echo strMessage
End Sub
ActivacióndeEncendidoenLAN
'**********************************************************************
'*** Name: SampleWuOLEnable.vbs
'*** (Nombre: SampleWuOLEnable.vbs)
'*** Purpose: To enable Wakeup On LAN on a Dell OMCI client.
'*** (Objetivo: Activar el encendido en LAN de un cliente Dell OMCI.)
'*** Usage: cscript.exe //nologo SampleWuOLEnable.vbs <systemname>
'*** (Uso: cscript.exe //nologo SampleWuOLEnable.vbs <nombre del sistema>)
'***
'*** 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.
'*** (Esta secuencia de comandos de muestra se proporciona como ejemplo
'***solamenteynohasidoprobada,niestágarantizadadeningunamanera
'***porDell;Dellrechazacualquierresponsabilidadrelacionadaconésta.
'***Dellnoproporcionaasistenciatécnicaconrespectoaestetipode
'***secuenciasdecomandos.Paraobtenermásinformaciónsobrelas
'***secuenciasdecomandosdeWMI,consulteladocumentacióndeMicrosoft
'*** sobre el tema.)
'**********************************************************************
Option Explicit
'***Declarevariables(Declaracióndevariables)
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPropValue
'*** Check that the right executable was used to run the script
'***andthatallparameterswerepassed(Verifiquequeseutilizóel
'*** archivo ejecutable correcto para ejecutar la secuencia de comandos
'***yquetodoslosparámetrospasaron)
Si (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) O _
(Wscript.Arguments.Count<1)Entonces
CallUsage()
WScript.Quit
End If
'***Initializevariables(Inicializacióndevariables)
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SMBIOSSettings"
strKeyValue = "0"
strPropName = "WakeupOnLan"
'*** Retrieve the instance of Dell_SMBIOSSettings class (there should
'***onlybe1instance).(Recuperalainstanciadeclasedeconfiguración
'***deDell_SMBIOSSettings[debeexistirsólo1instancia].)
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Set the value of WakeUpOnLan only if it is not already '6' ("Enable
'***forallNICs")(EstableceelvalordeEncendidoenLANsólo
'*** si no ha llegado a '6' ["Activado para todos los NIC"])
if strPropValue <> 6 then










