Locate Dell Service Tag: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
Line 16: Line 16:
bios=$(dmidecode -s bios-version)
bios=$(dmidecode -s bios-version)
cpu=$(dmidecode -s  processor-version)
cpu=$(dmidecode -s  processor-version)
hn=$(hostname)


echo
echo
Line 21: Line 23:
echo -e ' ' $model
echo -e ' ' $model
echo '================================='
echo '================================='
echo -e '  Hostname :' $hn
echo -e 'Service Tag :' $tag
echo -e 'Service Tag :' $tag
echo -e '      BIOS :' $bios
echo -e '      BIOS :' $bios

Revision as of 01:26, 29 September 2015

Linux Platform

yum -y install dmidecode
dmidecode -s system-serial-number

Script

#!/bin/bash

model=$(dmidecode -s system-product-name)
tag=$(dmidecode -s system-serial-number)
bios=$(dmidecode -s bios-version)
cpu=$(dmidecode -s  processor-version)
hn=$(hostname)


echo
echo '================================='
echo -e ' ' $model
echo '================================='
echo -e '   Hostname :' $hn
echo -e 'Service Tag :' $tag
echo -e '       BIOS :' $bios
echo -e '        CPU :' $cpu
echo
echo

Windows Platform

From a Command Prompt

wmic bios get serialnumber