Dell Service Tag Commands
In this post I’ll show dell service tag command line CMD commands as well as PowerShell dell service tag commands to lookup your Dell Service tag programmatically. This can be useful to know how to find dell service tag if sticker is missing, or perhaps you’re just lazy and want to know how to check dell laptop serial number using command prompt so you don’t have to flip it over. And if you’re an IT pro, I’ll show you how to collect dell service tags from a list of servers without getting up from your desk.
Dell Service Tag Command Line using WMIC
Easiest way to get a dell service tag from command line is going thru the Win32_BIOS WMI class, which represents the attributes of the computer system’s basic input/output services (BIOS). This works because your Dell Service Tag is stored in the BIOS SerialNumber property. One method how to get dell service tag from CMD is using WMIC (WMI command-line utility). To do this you’ll have to be interactively logged into the system you want to obtain the service tag from. Simply open a CMD command prompt and enter the following command:
wmic bios get serialnumber
You can also use wmic command to get service tag remotely by using the /node parameter. Handy to get dell service tag cmd remotely
wmic /node:REMOTECOMPUTERNAME bios get serialnumber
Notice in the second example (screenshot below), we’re using the same wmic to get dell tag number from command line on a remote host. Also notice that I’m using the /format parameter to display the serial number (service tag) in csv format:
WMIC is probably the first command to get service tag and it’s great for quickly getting the Dell service tag of your computer using a Windows command line with very little typing.
Get Dell Service Tag PowerShell
Getting your Dell Service Tag using PowerShell, however, requires even less typing. Plus, as you’ll see, it is more versatile when it comes to manipulating your output.
To quickly view your service tag using PowerShell, simply use the following command:
gwmi win32_bios
Ok I cheated there a little bit to make for less typing. GWMI is a PowerShell Alias for Get-WmiObject. The benefit of using PowerShell is how easy it is to format and export your output. To create a table with the system hostname and serial number, just pipe into Select-Object:
Get-WmiObject win32_bios -ComputerName REMOTECOMPUTERNAME | Select-Object PSComputerName, SerialNumber
The best thing is that you can export a CSV file of Dell Service Tags from a list of server names by using one easy, albeit long, line:
Get-Content .\serverlist.txt | %{Get-WmiObject win32_bios -ComputerName $_ | select PSComputerName, SerialNumber | Export-Csv -NoTypeInformation ServerNamesAndDellServiceTagNubmers.csv -Append}
And voila, this is how the output will look like in Excel
I know there are other ways of obtaining your Dell Service tag programmatically, including using the old Dell atag utility, however as far as I know, I haven’t seen any 64bit versions of that utility. Please comment below on any other dell service tag command line options I’ve missed.