PowerShell One-Liner: Hardware SKU


Someone asked me what kind of server I was running in the lab.  Uh, I don’t have lab access, and even if I do, how the heck would I find it?


PS> Get-WmiObject Win32_ComputerSystem | fl


Domain              : testlab
Manufacturer        : HP
Model               : ProLiant DL380 G4
Name                : testlab1234
PrimaryOwnerName    :
TotalPhysicalMemory : 6373933056


 Cool.  (Even moreso because I might get them to let me have a G5.)

Comments (1)

  1. timid says:

    Here's a function for it:

    function Get-ComputerSKU {

       param ( [string[]]$computerName = @('.') );

       $computerName | % {

           if ($_) {

               Get-WmiObject -ComputerName $_ Win32_ComputerSystem | Select-Object __Server, Manufacturer, Model;

           }

       }

    }