November 15th, 2009

I Can Do That With 1 Line of PowerShell: Installed Software

PowerShell Team
PowerShell Team

Ying Li has a cool PowerShell Script to list installed Software on a local computer HERE

When I looked at it and thought to myself, I can do that with 1 line (if I cheat a little).  Here it is:

PS> gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |Select DisplayName, DisplayVersion, Publisher, InstallDate, HelpLink, UninstallString |ogv

 

Here is what  you get for that 1 line of code:

image

 

I cheated by using OGV  (Out-GridView).  Ying used Excel and the output is nicer.  But when you only want to spend a single line…  🙂

 

Experiment!  Enjoy!  Engage!

Jeffrey Snover [MSFT]
Distinguished Engineer
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Category
PowerShell

Author

PowerShell Team
PowerShell Team

PowerShell is a task-based command-line shell and scripting language built on .NET. PowerShell helps system administrators and power-users rapidly automate tasks that manage operating systems (Linux, macOS, and Windows) and processes.

0 comments

Discussion are closed.