

get-ciminstance -classname win32_bios -computername contososrv1 | format-list serialnumberĪfter –computername in the example above, replace contososrv1 with the name of the remote server you want to query. 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. Windows Remote Management (WINRM) is enabled by default in Windows Server 2012 R2. The get-ciminstance cmdlet creates a temporary session to remote computers using the WSMAN protocol over HTTP. (Source: Russell Smith) Retrieving the Serial Number from a Remote Computer

Using PowerShell and WMI to get the serial number of a computer. To display only the serial number, type: get-ciminstance win32_bios | format-list serialnumber

In the prompt window, run the following command: get-ciminstance win32_bios Log on to Windows Server 2012 R2, click the PowerShell icon on the desktop taskbar. To retrieve the BIOS serial number of the local computer, we need to access the Win32_BIOS WMI class. It allows administrators to run WMI queries on local or remote computers. The get-ciminstance PowerShell command was introduced in PowerShell 3.0. Retrieving the Serial Number from a Local Computer In this edition of Ask the Admin, I’ll show you how to use PowerShell to get the serial number of a local or remote computer from the computer BIOS. The serial number is also found in the BIOS, and can be retrieved using Windows Management Instrumentation (WMI). Sometimes it can be useful to identify computer hardware for inventory purposes using its serial number, which is often written on a small sticker affixed to the underside of the device.
