PowerShell Nugget

Ever forget what kind of CPU you have?  Or Motherboard?  Or who produced your RAM?

You could dig around in systems inventory tools for hours…OR you could get the answer in a few keystrokes with PowerShell.

For Motherboard Manufacturer and other info:

Get-WmiObject Win32_BaseBoard

This will give a description of the Manufacturer, the Model, Name, Serial, SKU and Product Model of your motherboard.

For CPU and RAM information, look no further than Win32_Processor and Win32_PhysicalMemory.

To discover more helpful classes you can type the first few letters of a potential class and append an asterisk and the -List switch to get a list of the classes available.  Also, don’t forget to pipe into the Format-List * command to list all available properties of an object.  Finally, for readability, throw a ‘| more’  or ‘Out-Host -Paging’ to the end for /p like functionality.

Get-WmiObject Win32_P* -List | Format-List * | more

I hope this was helpful!

Have a code issue? Share your code by going to Gist.github.com and pasting your code there, then post the link here!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.