[PowerShell Efficiency]–Check the list of installed programs

As part of my lab environment where I am using VMWare ESXi Hypervisor, I am required to install VMWare Tools similar to the Integration Services that is found in Hyper-V. However, due to the challenge that I have threw to myself that I am going to use “Server Core” for most of the servers unless there are software that required the GUI.

So since I can’t do what I use to do by finding out what I have installed and in current situation, I don’t even know whether VMWare Tools are installed already since I am deploying multiple virtual machines at one go.

In the GUI way, I could simply do the following,-

  1. Go to Control Panel
  2. Click on Programs and Features
  3. Tada, the list shown!

However, if we were to do it the PowerShell way…

Get-WmiObject -class Win32_Product

18-12-2013 3-36-46 PM

What if… I am being greedy? What if I have a long list of programs that are installed? Wouldn’t I be scrolling till I go mad?

Then let’s do some filtering…

Get-WmiObject -class Win32_Product | where {$_Name -like "*VMWare*"}

The first segment of the one-liner is the same as before, just that I have added a “where-clause” to do filtering of the intended value that I hope to find.

18-12-2013 3-43-49 PM

So, is this much more convenient and faster? Can you do filtering in your add/remove programs? Smile Of course you can do filtering by doing “Search”, but time it yourself to see how long it takes!

Milton Goh

[PowerShell Efficiency]–Check the list of installed programs

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s