Users Guide
'*** Nombre: SampleForcePXE.vbs
'*** Objetivo: forzar a un cliente Dell OMCI a iniciar en PXE en el siguiente reinicio.
'*** Uso: cscript.exe //nologo SampleForcePXE.vbs <nombre_del_sistema>
'***
'***Estasecuenciadecomandosdemuestraseproporcionaúnicamentecomoejemploynohasido
'***probabanitieneningunagarantíaporpartedeDell;Dellseeximedetoda
'*** responsabilidad relacionada con esta secuencia de comandos. Dell no proporciona asistencia
'***técnicarelacionadaconestetipodesecuenciasdecomandos.Paraobtenermásinformaciónsobresecuencias
'***decomandosdeWMI,consulteladocumentacióncorrespondientedeMicrosoft.
'****************************************************
Opciónexplícita
'*** Declarar variables
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPropValue
'***Comprobarqueseutilizóelarchivoejecutablecorrectoparaejecutarlasecuenciadecomandos
'***yqueseproporcionarontodoslosparámetros
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count<1)Then
CallUsage()
WScript.Quit
End If
'*** Inicializar las variables
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_Configuration"
strKeyValue = "Configuration"
strPropName = "ForcePXEOnNextBoot"
'*** Recuperar la instancia de la clase Dell_Configuration (debe haber
'*** solo 1 instancia).
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Establecer el nuevo valor para la propiedad y guardar la instancia, pero solo
'*** si el valor actual no es actualmente 3 ('Activado')
If strPropValue <> 3 Then
objInstance.Properties_.Item(strPropName).Value=3
objInstance.Put_
'***Sisepresentaalgúnerror,informaralusuario
IfErr.Number<>0Then
WScript.Echo"FallóelestablecimientodePXEparaelsiguientereinicio."
EndIf
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//nologoSampleForcePXE.vbs<nombre_del_sistema>"
WScript.Echo strMessage
End Sub)
ActivacióndeEncendidoenLAN
AcontinuaciónsepresentaunVBScriptdemuestraqueactivaráelEncendidoenLANenunclienteDellOMCI.
'****************************************************
'*** Name: SampleWuOLEnable.vbs
'*** Purpose: To enable Wakeup On LAN on a Dell OMCI client.
'*** Usage: cscript.exe //nologo SampleWuOLEnable.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 strKeyValue
Dim objInstance










