Users Guide

'*** 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:"
strMessage=strMessage&objInstance.Properties_.Item
("BIOSVersion").Value
ExitFor
Next
'*** Display the results
WScript.Echo strMessage
'*** Sub used to display the correct usage of the script
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _
"cscript.exe//nologoSampleSystemSummary.vbs<systemname>"
WScript.Echo strMessage
End Sub
('****************************************************
'*** Nombre: SampleSystemSummary.vbs
'***Objetivo:mostrarlaetiquetadepropiedad,laetiquetadeservicioylarevisióndelBIOSde
'*** un cliente Dell OMCI.
'*** Uso: cscript.exe //nologo SampleSystemSummary.vbs <nombre_del_sistema>
'***
'***Estasecuenciadecomandosdeejemploseproporcionaúnicamentecomomuestraynohasido
'***probabanitieneningunagarantíaporpartedeDell;Dellseeximedetoda
'*** responsabilidad relacionada con esta secuencia de comandos. Dell no proporciona asistencia
'***técnicarelacionadaconestetipodesecuenciasdecomandos.Paraobtenermásinformaciónsobresecuencias
'***decomandosdeWMI,consulteladocumentacióncorrespondientedeMicrosoft.
'****************************************************
Opciónexplícita
'*** Declarar variables
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim colInstances
Dim objInstance
Dim strWQLQuery
Dim strMessage
Dim strKeyName
'***Comprobarqueseutilizóelarchivoejecutablecorrectoparaejecutarlasecuenciadecomandos
'***yqueseproporcionarontodoslosparámetros
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count<1)Then
CallUsage()
WScript.Quit
End If
'*** Inicializar las variables
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SystemSummary"
strKeyName = "Name"
'*** Consulta WQL para recuperar instancias de Dell_SystemSummary
strWQLQuery = "SELECT * FROM " & strClassName & " WHERE " & _
strKeyName&"="&Chr(34)&strComputerName&Chr(34)
'*** Recuperar las instancias de la clase Dell_Configuration (debe haber solo
'*** 1 instancia).
Set colInstances = GetObject("WinMgmts:{impersonationLevel=impersonate}//"&_
strComputerName&"/"&strNameSpace).ExecQuery(strWQLQuery,"WQL",