Useful Powershell and WMI Tip

During my day to day operations, currently doing a documentation exercise, I came across the following rather useful tip to recover the UUID of a server from within Windows using Powershell either locally or on a remote server. The UUID is a 32 bit number for the server that is guaranteed to be unique across the world. It’s a useful bit of data to have for server inventories etc. Here’s the code:

Local machine:

get-wmiobject win32_computersystemproduct | select-object UUID

Remote machine

get-wmiobject win32_computersystemproduct –computername xxxxxxxx | select-object uuid

One caveat on the remote machine entry. Make sure the Firewall is configured to allow remote WMI Access on the target machine.

  • That’s quite an interesting object, I thought it may be more useful to add a bit of context to the output assuming that people may be doing this for more than one machine :
    get-wmiobject win32_computersystemproduct | select-object name, IdentifyingNumber, Vendor, UUID

  • Peter Johnson

    Thanks for the comment. I will do. It was done on the hop so to speak. It’s freezing here in Swaziland.

  • admin

    Please categorise your post as well 🙂

Pin It on Pinterest