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 : 16,927
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2
      My Computer


  3. Posts : 18,044
    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,044
    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,044
    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,044
    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,203
    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 : 1,756
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #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 Computer


 

  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 06:32.
Find Us




Windows 10 Forums