Users Guide

strMethod = "FlashBios"
'*** Recuperar la clase Dell_Configuration
Set objClass = GetObject("WinMgmts:{impersonationLevel=impersonate}//" & _
strComputerName&"/"&strNameSpace&":"&strClassName)
Set objMethod = objClass.Methods_(strMethod)
'***EstablecerelparámetrodeentradadelmétodoparaelURLdelarchivodeencabezadodelBIOS
Set objInParam = objMethod.inParameters.SpawnInstance_()
objInParam.sUrl = WScript.Arguments(1)
'***Ejecutarelmétodo
Set ObjOutParam = objClass.ExecMethod_(strMethod, objInParam)
'***Informaralusuariosielmétodoseejecutósatisfactoriamente
'*** Nota: si el valor generado es 0, no significa que el BIOS del sistema se ha
'***actualizado,solosignificaqueelmétododeactualizaciónsehainiciado
'*** correctamente.
If objOutParam.ReturnValue = 0 Then
WScript.Echo"Elmétodoterminócorrectamente."
else
WScript.Echo"Elmétodofalló."
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SampleFlash.vbs<nombre_del_sistema><URLdelarchivo
deencabezadodelBIOS>"
WScript.Echo strMessage
End Sub)
ActivacióndeinicioPXEenelsiguientereinicio
AcontinuaciónsepresentaunVBScriptdeejemploqueobligaráalclienteDellOMCIainiciarenPXEenelsiguientereinicio.
'****************************************************
'*** Name: SampleForcePXE.vbs
'*** Purpose: To force a Dell OMCI client to boot to PXE on next reboot.
'*** Usage: cscript.exe //nologo SampleForcePXE.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
Dim strPropName
Dim strPropValue
'*** 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_Configuration"
strKeyValue = "Configuration"
strPropName = "ForcePXEOnNextBoot"
'*** Retrieve the instance of Dell_Configuration class (there should
'*** only be 1 instance).
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Set the new value for the property and save the instance, but only
'*** if the current value is not already 3 ('Enabled')