Locate Dell Service Tag

From KlavoWiki
Revision as of 02:04, 29 September 2015 by David (talk | contribs) (→‎Script)
Jump to navigationJump to search

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)
ram=$(dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 } END{ print x "MB"}')
os=$(cat /etc/redhat-release)

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

Windows Platform

From a Command Prompt

wmic bios get serialnumber