Categories
Microsoft

Getting the Serial Number and System SKU remotely

Getting serial Number and System SKU remotely.

Asset management continues even when we are in a pandemic. I needed to get the serial number of a surface Pro and I needed to do it remotely. To do that, I used the script below in addition to remote PowerShell.


$ComputerName = #declare a computer name here
Enter-PsSession -ComputerName $ComputerName

#get the serial number of the device
Wmic BIOS Get SerialNumber

We can also skip the remote PowerShell and do it with the /node: parameter.

Wmic /Node:mediacenter /User:kenny BIOS Get SerialNumber

If we need to do the same action on multiple devices, we can either export the hostname of the computers to a txt file, or just list them all separate by ‘,’

Wmic /Node:kenny,mediacenter /user:kenny BIOS Get SerialNumber
Wmic /Node:@file.txt /user:kenny BIOS Get SerialNumber

Note that my computer “Kenny” does not have a serial number because this is a custom built machine.

I also needed to find out if the computer is a Surface Pro 4 or a Surface Pro 6. To do that, I used the below script.

GWMI -Namespace root\wmi -Class MS_SystemInformation | Select SystemSKU

If you are using surface Pro, this should return the model listed on this documentation from Microsoft.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s