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.

Pin It on Pinterest