Thursday, December 18, 2014

Remotely obtain or get the Dell Openmanage Server Administrator, OMSA version

There are two different things
One is the OMSA version, and the other is the server administrator version (agent version) of the web at port 1311.

In most cases you would be looking for the OMSA version I guess.
Best method would be using powershell:

dellwmi.ps1
==============================
#Set variables
$elserv =  $args[0]
$filename = $args[1]
$elpath = $args[2]
get-wmiobject Dell_SoftwareFeature -namespace root\cimv2\dell -computername $elserv |  select-object __Server, AgentVersion, Version | export-csv "$filename"
==============================
Script Output






An alternative:
As per:
http://en.community.dell.com/dell-groups/dell-management-console/m/dell_management_console-mediagallery/19484157
We know:
Getting OMSA Version (OID .1.3.6.1.4.1.674.10892.1.100.2.0)....
Success!  Value received: 5.6.0
Alternatively you can do a snmpwalk of (OID .1.3.6.1.4.1.674) to Dell's reserved OID.

Through SNMP and uinsg a script for example:
for /f %%i in (lista.txt) do (
echo %%i;>> %%i.csv
snmputil get %%i public .1.3.6.1.4.1.674.10892.1.100.2.0>> %%i.csv
sed -i ":a;N;$!ba;s/\n//g" %%i.csv
del sed*.
)

Search installed Product:
for /f %%i in (lista.txt) do wmic /node:%%i product get caption,version /format:csv >>%%i.csv
It didn't really worked for me because I only obtained the version on a few servers with this method 187 of 540 approximately.

Last but not least:
download sed, wget and grep ports for windows.
==========================================
for /f %%i in (lista.txt) do wget --tries 1 --no-check-certificate -r https://%%i:1311/servlet/UOMSAAbout
for /f %%i in (lista.txt) do wget --tries 1 --no-check-certificate -r https://%%i:1311/UOMSAAbout

set ahora=%cd%
for /f %%i in (lista.txt) do (
echo %%i| sed "s/+1311//g" >%%i.txt
cd /d %ahora%
if exist "%%i+1311\servlet" cd "%%i\servlet+1311"
if not exist "%%i+1311\servlet" cd "%%i+1311"
grep -r -i "version" . | grep -i "OpenManage" >>%ahora%\%%i.txt
cd /d %ahora%
)
==========================================
You will need to remove strings that you don't need but the output would look like:


0 comments:

Post a Comment