remote software and version query.

I need a PS script to query installed software and version on remote servers which include the windows 2003, 2008 and 2012 servers.  

Please advise.  

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.

Ankit PareekOnline MarketingCommented:
Hey from power shell script you can check all installed software list at single time. I am not sure that its also works on remote server as well as . Here unable to write all steps you can follow this link to read out all steps
nav2567Author Commented:
I have read that already but it did not help.
Ankit PareekOnline MarketingCommented:
Hey try to use this may be this work
Function Get-RemoteProgram {
Generates a list of installed programs on a computer

This function generates a list by querying the registry and returning the installed programs of a local or remote computer.

Name: Get-RemoteProgram
Author: Jaap Brasser
Version: 1.2.1
DateCreated: 2013-08-23
DateUpdated: 2015-02-28


.PARAMETER ComputerName
The computer to which connectivity will be checked

Additional values to be loaded from the registry. Can contain a string or an array of string that will be attempted to retrieve from the registry for each program entry


Will generate a list of installed programs on local machine

Get-RemoteProgram -ComputerName server01,server02

Will generate a list of installed programs on server01 and server02

Get-RemoteProgram -ComputerName Server01 -Property DisplayVersion,VersionMajor

Will gather the list of programs from Server01 and attempts to retrieve the displayversion and versionmajor subkeys from the registry for each installed program

'server01','server02' | Get-RemoteProgram -Property Uninstallstring

Will retrieve the installed programs on server01/02 that are passed on to the function through the pipeline and also retrieves the uninstall string for each program
            $ComputerName = $env:COMPUTERNAME,

    begin {
        $RegistryLocation = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\',
        $HashProperty = @{}
        $SelectProperty = @('ProgramName','ComputerName')
        if ($Property) {
            $SelectProperty += $Property

    process {
        foreach ($Computer in $ComputerName) {
            $RegBase = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine,$Computer)
            foreach ($CurrentReg in $RegistryLocation) {
                if ($RegBase) {
                    $CurrentRegKey = $RegBase.OpenSubKey($CurrentReg)
                    if ($CurrentRegKey) {
                        $CurrentRegKey.GetSubKeyNames() | ForEach-Object {
                            if ($Property) {
                                foreach ($CurrentProperty in $Property) {
                                    $HashProperty.$CurrentProperty = ($RegBase.OpenSubKey("$CurrentReg$_")).GetValue($CurrentProperty)
                            $HashProperty.ComputerName = $Computer
                            $HashProperty.ProgramName = ($DisplayName = ($RegBase.OpenSubKey("$CurrentReg$_")).GetValue('DisplayName'))
                            if ($DisplayName) {
                                New-Object -TypeName PSCustomObject -Property $HashProperty |
                                Select-Object -Property $SelectProperty

Open in new window

One note on the above script - it will require the Remote Registry service to be running on the remote machine.  Typically not an issue on servers where it is often running by default, but just thought you should be aware.  There are some other methods like using WMI or PowerShell Remoting (my preferred method), but most of the scripts you'll find are like the above.

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
nav2567Author Commented:
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

From novice to tech pro — start learning today.