Need PowerShell script to export a list of Add/Remove Programs


I need a PowerShell script that will export a list of all software insalled on a Windows 2003 server.  Basically..... something similar to going into Add/Remove Programs and doing an export function of all the programs and Windows updates installed, but it needs to happen with a PowerShell script.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Funny you ask :) just did a blog on this

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
martit01Author Commented:
Looks good BSonPosh.  Regarding the <ComputerName> instead of having to enter this manually, is there a way this script could run repeatedly pulling the ComputerName from our Active Directory or even an Excel spreadsheet?

Thanks again!
Sure.. you can do either. I would recommend downloading and installing the AD CMDLets from quest (link in my profile)

Then you can do something like

Get-QADComputers | %{Get-InstalledSoftware $_}

or if you have the computers in a list file
get-content <file> | %{Get-InstalledSoftware $_}

If you plan to pipe this to a file you will need to change the write-host to write-output
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

martit01Author Commented:
you may have just gotten me promoted!
Thanks again BSonPosh:)
glad to help.. make check payable to...
martit01Author Commented:
Hey BSonPosh,

I'm able to run the script against my computer no problem. But, I'm not able to run it against my list of servers. I have a list titled "C:\DevServerList.txt" and my powerscript is "C:\InstalledSoftware.ps1".  

From PowerShell I type the following:
PS C:\> get-content DevServerList.txt | %{Get-InstalledSoftware $_}

But, i'm getting the following error from PowerScript:  The term 'Get-InstalledSoftware' is not recognized as a cmdlet, function, operable program, or script file.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.