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?
BSonPoshConnect With a Mentor Commented:
Funny you ask :) just did a blog on this
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
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

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.

All Courses

From novice to tech pro — start learning today.