≡ Menu

Powershell: Script to query softwares installed on remote computer

UPDATE(15/7/2015): This script is updated recently to query 32-bit as well as 64-bit applications installed on remote computers. It also provides an extra column in the output which indicates the architecture(x86 or x64) of the software.

Recently I came across a forum question where I have seen people using Win32_Product WMI class to get the installed installed applications list from remote computers. Historically, Win32_Product proved to be a buggy one due to various factors (which I will talk in later posts). So, I didn’t recommend them to use Win32_Product WMI class. If not WMI, what are the various options available to get the installed problems from remote computers. There are two methods (1) Using Win32Reg_AddRemovePrograms (2) Using Registry(uninstallkey).

The Win32Reg_AddRemovePrograms is not a common WMI class that you will find in any windows computer. It comes along with SMS or SCCM agent installation. So if you have one of these agents then probably you can explore this method. Otherwise, we need to rely on registry to get this information. Is the information queried from registry is accurate? My answer is YES and NO. It gives all the applications installed by both MSI installer and executables. But some of the registry keys will have less information about the software — not sure why it is that way.

Keeping the downsides aside, it is definitely the best approach to get installed softwares from remote computer. I am also excluding the applications from display if their display name black(which makes sense). This script will return the uninstall string as well which is essential for uninstalling the software. I will use this in my upcoming posts to uninstall a software remotely.

Now Code follows. (download)

[cmdletbinding()]            
param(            
 [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]            
 [string[]]$ComputerName = $env:computername            
)            
            
begin {            
 $UninstallRegKeys=@("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall",            
     "SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall")            
}            
            
process {            
 foreach($Computer in $ComputerName) {            
  Write-Verbose "Working on $Computer"            
 if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {            
  foreach($UninstallRegKey in $UninstallRegKeys) {            
   try {            
    $HKLM   = [microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$computer)            
    $UninstallRef  = $HKLM.OpenSubKey($UninstallRegKey)            
    $Applications = $UninstallRef.GetSubKeyNames()            
   } catch {            
    Write-Verbose "Failed to read $UninstallRegKey"            
    Continue            
   }            
            
   foreach ($App in $Applications) {            
   $AppRegistryKey  = $UninstallRegKey + "\\" + $App            
   $AppDetails   = $HKLM.OpenSubKey($AppRegistryKey)            
   $AppGUID   = $App            
   $AppDisplayName  = $($AppDetails.GetValue("DisplayName"))            
   $AppVersion   = $($AppDetails.GetValue("DisplayVersion"))            
   $AppPublisher  = $($AppDetails.GetValue("Publisher"))            
   $AppInstalledDate = $($AppDetails.GetValue("InstallDate"))            
   $AppUninstall  = $($AppDetails.GetValue("UninstallString"))            
   if($UninstallRegKey -match "Wow6432Node") {            
    $Softwarearchitecture = "x86"            
   } else {            
    $Softwarearchitecture = "x64"            
   }            
   if(!$AppDisplayName) { continue }            
   $OutputObj = New-Object -TypeName PSobject             
   $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.ToUpper()            
   $OutputObj | Add-Member -MemberType NoteProperty -Name AppName -Value $AppDisplayName            
   $OutputObj | Add-Member -MemberType NoteProperty -Name AppVersion -Value $AppVersion            
   $OutputObj | Add-Member -MemberType NoteProperty -Name AppVendor -Value $AppPublisher            
   $OutputObj | Add-Member -MemberType NoteProperty -Name InstalledDate -Value $AppInstalledDate            
   $OutputObj | Add-Member -MemberType NoteProperty -Name UninstallKey -Value $AppUninstall            
   $OutputObj | Add-Member -MemberType NoteProperty -Name AppGUID -Value $AppGUID            
   $OutputObj | Add-Member -MemberType NoteProperty -Name SoftwareArchitecture -Value $Softwarearchitecture            
   $OutputObj            
   }            
  }             
 }            
 }            
}            
            
end {}

Copy this code to a text file and save it as Get-InstalledSoftware.ps1. Look at the below image for usage.

{ 68 comments… add one }
  • Boe Prox February 20, 2012, 3:41 am

    I think you mean Win32reg_AddRemovePrograms that comes with having the SMS or SCCM agent installed, not Win32_AddRemovePrograms.

  • Igor Mazzola February 23, 2012, 7:54 pm

    Hi guys,

    i tried this script and it’s very smart !

    but, i find some problems when i try to generate the output with multiple servers

    .\Get-InstalledSoftware.ps1 -ComputerName remoteserver | ft -AutoSize

    it works !

    wich is the correct syntax to make the query on MULTIPLE servers ?

    -ComputerName server1 ; server2 ; server3 …. etc… ?

    or can i put @serverlist.txt ?

    many many thx

    • Sitaram Pamarthi February 24, 2012, 11:01 am

      @Igor, You can use either of ways listed below..

      Get-InstalledSoftware.ps1 -ComputerName PC1, PC2, PC3, PC4 | ft -auto

      (OR)

      Get-Content c:\temp\computers.txt | Get-InstalledSoftware.ps1 | ft -auto

      Where c:\temp\computers.txt is the file that contains computers list.

      • nairman April 15, 2012, 11:15 pm

        Ah, it looks like it works on other systems, I think it has something to do with powershell version…

        please ignore my question.
        thanks again

        Ah, it looks like it works on other systems, I think it has something to do with powershell version…

        please ignore my question.
        cheers

  • nariman April 15, 2012, 11:09 pm

    Hi
    Thank you for this great script, when I’m trying to run the script, I keep getting this below error which I’m not able to fix, I’d really appreciate your help :
    Missing closing ‘)’ in expression.
    At D:\temp\sysedge\result.ps1:6 char:2
    + [ <<<< string[]]$ComputerName = $env:computername

  • Jared Heinrichs June 29, 2012, 1:37 am

    I am having an issue with your scripts. It says “Uninstallation command triggered successfully” but the application never get’s removed from the remote machine.

    I’ve created both .ps1 files with a copy and past from your website.

    I first run:
    .\Get-InstalledSoftware.ps1 -ComputerName comuter01 > C:\users\username\computer01-programs.txt

    I then check the txt file for the AppGUID. I copy it.

    I then run: .\Uninstall-InstalledSoftware.ps1 -ComputerName computer01

    The script runs fine and then prompts me to enter the AppGUID. I paste it into the powershell window and hit enter. The script then tells me “Uninstallation command triggered successfully”.

    I checked back 15, 30, 45 and then an hour later and the program is still on the machine. I went to the workstations and un-installed it. There were no extra prompts like entering a password to remove the software. The program in question I am trying to remove is Kaseya.

    Any ideas?

    • David July 10, 2012, 1:24 am

      @Jared have you tried altering the way you kick off the uninstall? Try out:

      .\Get-InstalledSoftware.ps1 -ComputerName computer01 | ? {$_.AppName -eq “APPGUID HERE” } | .\Uninstall-InstalledSoftware.ps1

  • John July 13, 2012, 12:41 pm

    Hi,

    It seems not working on Windows 7.

  • Sitaram Pamarthi July 15, 2012, 11:44 pm

    This should work on Windows 7. What is the error you are seeing?

    • John July 17, 2012, 8:38 am

      Ops..it is due to 64bit…any script include 64bit?

      • Sitaram Pamarthi July 17, 2012, 12:06 pm

        Launch Powershell.exe from “C:\Windows\System32\WindowsPowerShell\v1.0” folder and run the script from that console. It should solve the problem.

  • ali August 30, 2012, 9:29 pm

    is it possible to have it output results to a txt file?

  • ali August 30, 2012, 9:34 pm

    i figured it out, thanks

  • Pri November 28, 2012, 8:33 pm

    Hi,

    How would I generate out put to txt file and in proper format?

    All I want is App name and Uninstall key,

    please help,

    Regards,

    Pri

  • Pri November 28, 2012, 8:37 pm

    Okay I figure out to get out put on txt file but, Can not get proper out put

    Message displayed ” WARNING: column “AppGUID” does not fit into the display and was removed.”

    Please help as I cannot see important information,

    Regards,

    Priyank

    • Sitaram Pamarthi November 28, 2012, 8:49 pm

      Priyank, post the complete command you are using. I will be able to suggest better.

  • Pri November 28, 2012, 9:05 pm

    I have tried to un-install software but I am facing same problem, it says, Uninstall successful but file is still there

    PLEASE HELP….
    Thank you

  • Pri November 28, 2012, 10:44 pm

    Hello,

    I have used below command and it worked— Thanks

    .\Get-InstalledSoftware.ps1 -ComputerName computer01 | ? {$_.AppName -eq “APPGUID HERE” } | .\Uninstall-InstalledSoftware.ps1

    Now,
    If I would like to install particular software on any machine in network, or as soon as they connect to our network or by list of machines from txt file , and if that software is already installed, I would get prompt to over rite,

    What Script I can use to install it , as I have below command, to use that so far

    If it’s a MSI package:
    $product= [WMICLASS]”\\$RemoteSystem\ROOT\CIMV2:win32_Product”
    $product.Install(“PathOfyourProgram.msi”)

    If it’s a EXE package:
    ([WMICLASS]”\\$RemoteSystem\ROOT\CIMV2:win32_process”).Create(“cmd.exe /c PathOfyourProgram.exe /s /v`” /qn”)

    But I do not want to interrupt any machine or install power shell on those machine,

    As we have some old –XP workstations as well in Network where no power shell installed on those machine

    Please help,

    Thank You

  • vtBrit December 6, 2012, 8:33 pm

    This is excellent and works great!

    I do have 1 question, do you know a good way to install an exe or msi on a remote pc?

    Using your script I am able to find and remove the application now I want to install a updated application.

    thoughts?

    • Sitaram Pamarthi December 6, 2012, 10:46 pm

      In the uninstall script replace the msiexec uninstallation instruction with installation command.

      For example:-
      $returnval = ([WMICLASS]”\\$computerName\ROOT\CIMV2:win32_process”).Create(“msiexec `/i \\server1\sources\software\media\install.msi `/qn”)

      Here i am executing install.msi with silent options to install the application. Make sure that the share on server1 has everyone read permissions.

  • vtBrit December 7, 2012, 12:39 am

    Thank for the quick reply.
    I am trying to remove a application off a number of machines. I am using the following

    .\Get-InstalledSoftware.ps1 -ComputerName is02-v | ft -autosize

    this works great if someone has logged into the PC at somepoint, but if the machine is new and no one has logged in I get errors.

    OpenRemoteBaseKey : Exception calling “OpenRemoteBaseKey” with “2” argument(s): “The network path was not found.

    At H:\Get-InstalledSoftware.ps1:18 char:62
    + $HKLM = [microsoft.win32.registrykey]::OpenRemoteBaseKey <<<< ('LocalMachine',$computer)
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

    OpenSubKey : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:19 char:37
    + $UninstallRef = $HKLM.OpenSubKey <<<< ($UninstallRegKey)
    + CategoryInfo : InvalidOperation: (OpenSubKey:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetSubKeyNames : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:20 char:48
    + $Applications = $UninstallRef.GetSubKeyNames <<<< ()
    + CategoryInfo : InvalidOperation: (GetSubKeyNames:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    OpenSubKey : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:24 char:37
    + $AppDetails = $HKLM.OpenSubKey <<<< ($AppRegistryKey)
    + CategoryInfo : InvalidOperation: (OpenSubKey:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetValue : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:26 char:46
    + $AppDisplayName = $($AppDetails.GetValue <<<< ("DisplayName"))
    + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetValue : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:27 char:43
    + $AppVersion = $($AppDetails.GetValue <<<< ("DisplayVersion"))
    + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetValue : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:28 char:44
    + $AppPublisher = $($AppDetails.GetValue <<<< ("Publisher"))
    + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetValue : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:29 char:47
    + $AppInstalledDate = $($AppDetails.GetValue <<<< ("InstallDate"))
    + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    GetValue : You cannot call a method on a null-valued expression.

    At H:\Get-InstalledSoftware.ps1:30 char:44
    + $AppUninstall = $($AppDetails.GetValue <<<< ("UninstallString"))
    + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

    Is this right? or I am doing something wrong?

    • Josiah May 14, 2013, 2:50 am

      I am also having this problem… Not sure how to fix it.

  • Harold January 18, 2013, 7:17 am

    Check that remote registry is started on compters you are scanning.

  • VT February 26, 2013, 11:01 pm

    Is there a way we can just get the last or recently installed application (after the Windows 7 with approved software list has been deployed)…which is mainly to keep a track of software installation (security purposes)

  • Marco March 1, 2013, 6:19 pm

    On 64 bit Systems one might run into trouble because the 32bit Programs are not recognized. I extended the code a bit:

    process {
    Write-Debug “Working on $Computer”
    if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {
    # get the architeture to provide bothe ore only one RegitryView
    $operatingSystem = (Get-WmiObject -computername $Computer -class Win32_OperatingSystem ).Caption
    if ((Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer -ea 0).OSArchitecture -eq ’64-bit’) {
    $RegistryViews = @(‘Registry32′,’Registry64’)
    } else {
    $RegistryViews = @(‘Registry32’)
    }

    foreach ( $RegistryView in $RegistryViews ) {
    $HKLM = [microsoft.win32.registrykey]::OpenRemoteBaseKey(‘LocalMachine’,$computer,$RegistryView)
    $UninstallRef = $HKLM.OpenSubKey($UninstallRegKey)
    $Applications = $UninstallRef.GetSubKeyNames()

    foreach ($App in $Applications) {

    • Tom May 30, 2013, 8:31 pm

      I’m a novice with powershell scripting and just picking it up so I’m unclear on where this clip would be placed in the original script and if it replaces anything.

    • Asela January 13, 2015, 11:24 am

      Can you add the full code to download? look like i cannot replace what you add.

  • Tom May 25, 2013, 1:33 am

    Microsoft Security Essentials doesn’t come back in the AppName listing. Looking to remotely uninstall MSE.

  • JP June 5, 2013, 5:43 pm

    Works great but I have two questions.
    1. I am unable to use the Get-Content c:\temp\computers.txt | Get-InstalledSoftware.ps1 | ft -auto to use a list of PC’s. It returns no results and I know the computer names are valid. What am I missing?
    2. How can i filter on one specific application?

    Thank you.

  • nikhil vaish September 9, 2013, 4:59 pm

    How i can use this script where i just want to find out if any application installed on server where display name start with “Citrix”

  • Ales November 27, 2013, 12:11 pm

    Hi, how can I use this script above and save as, to format to CSV or XLS(x)? Thank you AH

  • Jacky December 9, 2013, 9:09 am

    @Sitaram Pamarthi: The way below not work for me, Could you help me resolve this problem?
    Get-Content c:\test\computers.txt | Get-InstalledSoftware.ps1 | ft -auto

    some error like this:

    Get-InstallSoftware.ps1 : The term ‘Get-InstallSoftware.ps1’ is not recognized as the name of a cmdlet, function,
    script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.
    At line:1 char:37
    + Get-Content C:\Test\computers.txt | Get-InstallSoftware.ps1 | ft -Auto
    + ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Get-InstallSoftware.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    Suggestion [3,General]: The command Get-InstallSoftware.ps1 was not found, but does exist in the current location. Windo
    ws PowerShell does not load commands from the current location by default. If you trust this command, instead type “.\Ge
    t-InstallSoftware.ps1”. See “get-help about_Command_Precedence” for more details.

  • Jacky December 9, 2013, 9:56 am

    @JP: Your issue:
    1. I am unable to use the Get-Content c:\temp\computers.txt | Get-InstalledSoftware.ps1 | ft -auto to use a list of PC’s. It returns no results and I know the computer names are valid. What am I missing?

    Good news for you, I already fixed that issue. The command not correct but a little change in your .txt file.
    You must put each computer name on each line, exp:
    CP01
    CP02

    This will be work nice.

  • Jacky December 9, 2013, 9:59 am

    @JP: sorry I’m missing a little change for you: my the command is:
    Get-Content C:\Test\computers.txt | .\Get-InstallSoftware.ps1 | ft -auto

    • Sitaram Pamarthi December 29, 2013, 4:31 pm

      Jacky, Do you still need any help here? Looks like you already figured out what you need.

  • Mastana February 7, 2014, 10:09 pm

    How do I output to an excel format? or txt?
    Thanks, Excellent work!

  • E5E5 March 2, 2014, 7:10 pm

    Hello,
    This is very useful thank you so much!.
    I’m trying to install an update to a remote machine with modifying your uninstall script like this…
    $product = [WMICLASS]“\\$computerName\ROOT\CIMV2:win32_Product”
    $returnval = $product.Install(“msiexec.exe `/update AnUpdate.msp `/qn”)
    Although I am member of the Administrators group of the remote machine ; it gives me “You don’t have sufficient permissions to trigger the command “. Do you have any idea to solve it?
    Thanks

    • Sitaram Pamarthi March 4, 2014, 7:38 pm

      Hi E5E5, not sure why you have chosen Win32_Product to trigger msiexec command. I suggest you use win32_process WMI class to trigger a command(msiexec in your case) on remote computer.

  • Jeevan March 10, 2014, 10:16 am

    Hello Sitaram,

    this script is very good . but i need to find particular software.

    ex: i want to find is mcafee is install on list of server (gc .\serverlist.txt) or not if it is exist which version

    i want to fin particular software information not all installed

  • Liew March 27, 2014, 9:11 am

    Bro,

    I wanted to filter out and get software installed after 1/1/2014 because it’s too many software listed if using your script. I try below command but getting the same result/ my command is useless….

    .\Get-InstalledSoftware.ps1 -ComputerName Computer1| Where {$_.InstallDate -gt “1/1/2014”}

    Can advice which part is getting wrong?

  • Liew March 27, 2014, 11:55 am

    Pls ignore, I found the mistake just the format of InstallDate, the correct one should be as below:

    .\Get-InstalledSoftware.ps1 -ComputerName Computer1| Where {$_.InstallDate -gt “20140101″}

  • Aaron Dunbar July 11, 2014, 5:10 pm

    I keep getting a positional parameter error…

    says I don’t have a valid argument. I’m very new to scripting with only a years networking experience. Any help would be great.

    • Sitaram Pamarthi July 16, 2014, 3:06 pm

      Hi .. paste the output here. It is easy to provide resolution if I know the exact error

  • Nitish October 1, 2014, 10:03 am

    Hi,

    Great script but how do i run against list of servers?

    Thanks in advanced,

    Nits.

  • AVG October 7, 2014, 5:32 pm

    Hi @ Sitaram Pamarthi

    I am trying to run this script to test the softwares installed on my pc, i get this error
    & also what in case it needs to be run for multiple remote PCs

    some error like this:

    Get-InstallSoftware.ps1 : The term ‘Get-InstallSoftware.ps1′ is not recognized as the name of a cmdlet, function,
    script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
    correct and try again.

    Awating reply

    Thanks,

    • Sitaram Pamarthi October 18, 2014, 7:48 pm

      Make sure that you are executing the script from a PowerShell window. Looks like you are running it from command prompt.

  • Asela January 13, 2015, 10:53 am

    Hi,

    PS C:\temp> .\Get-InstalledSoftware.ps1 -ComputerName VMaster : ft -autosize
    C:\temp\Get-InstalledSoftware.ps1 : A positional parameter cannot be found that accepts argument ‘:’.
    At line:1 char:28
    + .\Get-InstalledSoftware.ps1 <<<< -ComputerName VDIMaster : ft -autosize
    + CategoryInfo : InvalidArgument: (:) [Get-InstalledSoftware.ps1], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Get-InstalledSoftware.ps1

    I'm getting following error?

    As

    • TechiBee January 19, 2015, 6:30 am

      PS C:\temp> .\Get-InstalledSoftware.ps1 -ComputerName VMaster | ft -autosize

      above is the correct command to use

  • Asela January 13, 2015, 11:31 am

    Hi,

    i cannot get the software on 64 bit Workstations?

  • Asela January 21, 2015, 4:04 am

    For get the 32bit and 64bit install Applications

    [cmdletbinding()]

    [cmdletbinding()]
    param(
    [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
    [string[]]$ComputerName = $env:computername

    )

    begin {
    $UninstallRegKey=”SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall”
    }

    process {
    foreach($Computer in $ComputerName) {
    Write-Debug “Working on $Computer”
    if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {
    # get the architeture to provide bothe ore only one RegitryView
    $operatingSystem = (Get-WmiObject -computername $Computer -class Win32_OperatingSystem ).Caption
    if ((Get-WmiObject -Class Win32_OperatingSystem -ComputerName $Computer -ea 0).OSArchitecture -eq ’64-bit’) {
    $RegistryViews = @(‘Registry32′,’Registry64′)
    } else {
    $RegistryViews = @(‘Registry32′)
    }

    foreach ( $RegistryView in $RegistryViews ) {
    $HKLM = [microsoft.win32.registrykey]::OpenRemoteBaseKey(‘LocalMachine’,$computer,$RegistryView)
    $UninstallRef = $HKLM.OpenSubKey($UninstallRegKey)
    $Applications = $UninstallRef.GetSubKeyNames()

    foreach ($App in $Applications) {
    $AppRegistryKey = $UninstallRegKey + “\\” + $App
    $AppDetails = $HKLM.OpenSubKey($AppRegistryKey)
    $AppGUID = $App
    $AppDisplayName = $($AppDetails.GetValue(“DisplayName”))
    $AppVersion = $($AppDetails.GetValue(“DisplayVersion”))
    $AppPublisher = $($AppDetails.GetValue(“Publisher”))
    $AppInstalledDate = $($AppDetails.GetValue(“InstallDate”))
    $AppUninstall = $($AppDetails.GetValue(“UninstallString”))
    if(!$AppDisplayName) { continue }
    $OutputObj = New-Object -TypeName PSobject
    $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.ToUpper()
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppName -Value $AppDisplayName
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppVersion -Value $AppVersion
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppVendor -Value $AppPublisher
    $OutputObj | Add-Member -MemberType NoteProperty -Name InstalledDate -Value $AppInstalledDate
    $OutputObj | Add-Member -MemberType NoteProperty -Name UninstallKey -Value $AppUninstall
    $OutputObj | Add-Member -MemberType NoteProperty -Name AppGUID -Value $AppGUID
    $OutputObj# | Select ComputerName, DriveName
    }
    }
    }
    }
    }
    end {}

  • david June 18, 2015, 3:30 pm

    Great script! Works great 🙂
    Anyone know of a way to exclude all Microsoft Installs? e.g. Office / Updates etc..?

    • TechiBee June 23, 2015, 4:36 pm

      David, you can try something like this.

      Get-InstalledSoftware.ps1 -ComputerName PC1 | ? {$_.AppVendor -NotMatch “Microsoft” }

  • Terry Odom July 17, 2015, 12:21 am

    I was hoping to get some assistance having this modified so that I can find applications from a specific publisher (Avaya) installed on all workstations in our domain. Any assistance is much appreciated.

    • TechiBee July 17, 2015, 8:38 am

      Hi, Keep all your workstations in a text file and try the below command.

      c:\temp\Get-InstalledSoftware.ps1 -ComputerName (Get-content c:\temp\workstations.txt) | Export-CSV c:\temp\installedsoftware.csv -notypeinformation

      This will export softwares installed on all your workstations to CSV file. You can filter down the CSV using excel to get the apps belongs to Avaya publisher.

      • Karthik September 19, 2017, 7:04 pm

        Tried the above step(c:\temp\Get-InstalledSoftware.ps1 -ComputerName (Get-content c:\temp\workstations.txt) | Export-CSV c:\temp\installedsoftware.csv -notypeinformation), but couldn’t get the data of other workstations, is there any privileges to be passed along with the command?

        • Wintel Rocks September 19, 2017, 7:24 pm

          hi Karthik, Make sure that you are running this script using a privileged account that has admin rights on the remote computers that you listed in workstations.txt

  • XT October 2, 2015, 6:55 pm

    amazing script !
    using .NET is nice as it does not require WinRM

    have you posted something about uninstall remotely ?

    Thanks
    XT

  • Agent Blah Blah November 3, 2015, 10:20 pm

    Hello,

    First of all, AWESOME SCRIPT!!

    question, I was able to export the list of queried systems to a spreadsheet, but I am wondering if you can add an OS version, and OS architecture column to the script?

    Thank you!

  • Dragon January 20, 2016, 8:53 pm

    Great script!

    I was having problems getting the Application list on remote servers, for some reason I always got an empty value.
    I modified your script and it worked ! 🙂

    THX!

  • Josh Ducan February 6, 2016, 6:20 pm

    I see other have been ael to get this to export to a .csv file. I added the line at the end of the scirpt “Export-CSV c:\temp\installedsoftware.csv -notypeinformation ” I then populated the CSV with the correct column headers.

    I’m stuck at this point but this script is awesome!

  • sarah June 9, 2016, 6:58 am

    Hi Guys , I am really new in power shell , I saved the script on my desktop I don’t now how can I run it , when I copied in power shell it works but I need to get the asset number from txt file and give the list off installed app in different asset number in excel file any one can help me with that please.

    Get-InstalledSoftware.ps1 -ComputerName (Get-Content D:\U\Desktop\test.txt)| out-file D:\U\Desktop\computers1.txt

    • Wintel Rocks June 19, 2016, 9:29 pm

      Hi, this script is to query installed applications by passing computer names from text file.

Leave a Comment