customer relationships

How to Get the Serial Number of a Remote Computer Using PowerShell

Retrieving the Serial Number from a Local Computer

The get-ciminstance PowerShell command was introduced in PowerShell 3.0. It allows administrators to run WMI queries on local or remote computers. To retrieve the BIOS serial number of the local computer, we need to access the Win32_BIOSWMI class.

Log on to Windows Server 2012 R2, click the PowerShell icon on the desktop taskbar. In the prompt window, run the following command:

To display only the serial number, type:

Using PowerShell and WMI to get the serial number of a computer

Retrieving the Serial Number from a Remote Computer

The get-ciminstance cmdlet creates a temporary session to remote computers using the WSMAN protocol over HTTP. Windows Remote Management (WINRM) is enabled by default in Windows Server 2012 R2. If it is not enabled on the remote computer you want to query, or the default WINRM listener has been deleted, run winrm qc at an elevated command prompt on the remote device to add the default listener.

After –computername in the example above, replace contososrv1 with the name of the remote server you want to query.

 

Windows Server 2003 and XP

The above commands should work if the remote computer is Windows 2008, Vista or later. To query Windows Server 2003 or XP, we need to configure a session that uses the DCOM protocol instead of WSMAN.

Run the following three commands in a PowerShell prompt to retrieve the serial number from a remote Windows Server 2003 computer, replacing contososrv1 with the name of the remote server:


Got a project that needs expert IT support?

From Linux and Microsoft Server to VMware, networking, and more, our team at CR Tech is here to help.

Get personalized support today and ensure your systems are running at peak performance or make sure that your project turns out to be a successful one!

CONTACT US NOW
one click social media designs