Getting a filtered list of installed software in powershell

Page 1 of 2 12 LastLast

  1. Posts : 24
    win 10
       #1

    Getting a filtered list of installed software in powershell


    Hello Win10 community,

    I wonder how it is possible to get a filtered list of the installed software on the computer using Windows PowerShell?

    For example I use the following command to list a names of installed programs:
    Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName

    Now I want to filter this output and to show only results that contains certain part of the name for example Python or Office

    What would be a correct command to do so?

    Thank you
      My Computer


  2. Posts : 17,101
    Windows 10 Home x64 Version 22H2 Build 19045.5371
       #2
      My Computer


  3. Posts : 18,032
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @Askic,

    Askic said:
    Now I want to filter this output and to show only results that contains certain part of the name for example Python or Office.

    What would be a correct command to do so?
    This should do what you want.

    Code:
    
    Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Where {$_.DisplayName -Like '*Python*' -Or $_.DisplayName -Like '*Office*'} | Select-Object DisplayName

    I hope this helps.
      My Computer


  4. Posts : 18,032
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #4

    Hello @Askic,

    You might also be interested in these [ SAME Principle ] . . .

    > HKCU:Software\Microsoft\Windows\CurrentVersion\Uninstall\*
    > HKLM:Software\Microsoft\Windows\CurrentVersion\Uninstall\*

    Insert the above in the command that I gave you for the results.

    I hope this helps.
      My Computer

  5.   My Computers


  6. Posts : 18,032
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #6

    Hello @hdmi,

    I could NOT get the Function to run in PS or PS ISE !
    Did it run for you ?
    What was the output ?
      My Computer


  7. Posts : 24
    win 10
    Thread Starter
       #7

    Thank you all for your help, especially Paul Black.
    BTW, I also couldn't run the the function Get-InstalledSoftware.
    I used GetHostbyName() function to check the computer name.
    In any case, the original problem of filtering output is solved.
      My Computer


  8. Posts : 18,032
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #8

    Hello @Askic,

    Askic said:
    Thank you all for your help, especially Paul Black.
    You are VERY welcome.

    Askic said:
    In any case, the original problem of filtering output is solved.
    Excellent news and thanks for the feedback.
      My Computer


  9. Posts : 1,209
    11 Home
       #9

    Paul Black said:
    Hello @hdmi,

    I could NOT get the Function to run in PS or PS ISE !
    Did it run for you ?
    What was the output ?
    Getting a filtered list of installed software in powershell-gimp.png
      My Computers


  10. Posts : 2,238
    Windows 10 Pro 22H2
       #10

    Paul Black said:
    Hello @hdmi,



    I could NOT get the Function to run in PS or PS ISE !
    Did it run for you ?
    What was the output ?
    I ran it elevated in PowerShell ISE and called the function using just Get-InstalledSoftware as I only wanted to query the machine it was running on. The script doesn't terminate gracefully when it runs out of results to process but it does the job.

    Getting a filtered list of installed software in powershell-powershell_ise_elevated.png

    Hope this helps...
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:23.
Find Us




Windows 10 Forums