# Finding computers that have software installed

**URL:** <https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771>\
**Category:** PowerShell Help\
**Created:** [August 9, 2020, 12:32am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771 "2020-08-09T00:32:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![poweroff](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@poweroff](https://forums.powershell.org/u/poweroff)\
**Post date:** [August 9, 2020, 12:32am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/1 "2020-08-09T00:32:58Z")

</div>

**Hello everyone,**

I’m looking for code that checks on which computers the putty software is installed.  
The output need to be exports the list of computer names to 2 files,  
In the first file it will be written in which computer names the software is installed and in the second file in which computer names the software is not installed.

**Thanks for the helpers.**

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 9, 2020, 4:10am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/2 "2020-08-09T04:10:51Z")

</div>

Adi, welcome to [Powershell.org](http://Powershell.org). Please take a moment and read the very first post on top of the list of this forum: [Read Me Before Posting! You’ll be Glad You Did!](https://powershell.org/forums/topic/read-me-before-posting-youll-be-glad-you-did).

When you post code, error messages, sample data or console output format it as code, please.  
In the “ **Text** ” view you can use the code tags “ **CODE** ”, in the “ **Visual** ” view you can use the format template “ **Preformatted** ”. You can go back edit your post and fix the formatting - you don’t have to create a new one.  
Thanks in advance.

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

What have you tried so far? We expect you to make an own attempt to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.

I think you should search for a software inventory solution for your environment. 😉

---

<div class="post-metadata">

**Author:** ![grokkit](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/grokkit/32/970_2.png) [@grokkit](https://forums.powershell.org/u/grokkit)\
**Post date:** [August 10, 2020, 5:38am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/3 "2020-08-10T05:38:57Z")

</div>

~~You can try [Get-CimInstance](https://docs.microsoft.com/en-us/powershell/module/CimCmdlets/Get-CimInstance?view=powershell-7) with the class [Win32\_Product](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394378(v=vs.85)) to list applications on the system, but it may not list everything installed.~~ Per the github discussion [linked by TonyD05 below](https://powershell.org/forums/topic/finding-computers-that-have-software-installed/#post-248476), this is bad advice and probably won’t give the desired results anyway. Avoid.

Instead, have a look at Microsoft’s documentation on [Listing all uninstallable applications](https://docs.microsoft.com/en-us/powershell/scripting/samples/working-with-software-installations?view=powershell-7#listing-all-uninstallable-applications).

---

<div class="post-metadata">

**Author:** ![adminofthings](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@adminofthings](https://forums.powershell.org/u/adminofthings)\
**Post date:** [August 10, 2020, 5:52am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/4 "2020-08-10T05:52:41Z")

</div>

Since you can just run Putty without an install, this will be a tough task. When a system runs launches Putty.exe, a registry key `HKLM:\Software\SimonTatham` will be created. But the .exe could be anywhere on that system or on a remotely shared source.

---

<div class="post-metadata">

**Author:** ![tonyd](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/tonyd/32/1041_2.png) [@tonyd](https://forums.powershell.org/u/tonyd)\
**Post date:** [August 10, 2020, 10:06am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/5 "2020-08-10T10:06:23Z")

</div>

There is also this when using Win32\_Product

> **[Why Win32\_Product is Bad News! - SDM Software](https://sdmsoftware.com/wmi/why-win32_product-is-bad-news/)**
>
> This entry isn’t strictly related to Group Policy, but something I came across in that context a few days ago. There is a WMI class called Win32\_Product. Querying this class lets you enumerate all installed MSI applications on a given system....

> <https://github.com/PowerShell/DscResources/issues/108>
>
> A lot of the resources are using the Win32\_Product WMI class to detect the curre…nt installation state in the Set or Test functions. Especially the System Center and the xSQLServer resource are making use of it. Even Mircosoft self does not recommend the usage of the class. So these queries should be replaced by another detection logic.
> 
> \> If you have an application that makes use of the above class, please contact the vendor to get an updated version that does not use this class.
> 
> https://support.microsoft.com/en-nz/kb/974524

&nbsp;

---

<div class="post-metadata">

**Author:** ![grokkit](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/grokkit/32/970_2.png) [@grokkit](https://forums.powershell.org/u/grokkit)\
**Post date:** [August 10, 2020, 11:45am UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/6 "2020-08-10T11:45:13Z")

</div>

> [@](#):
>
> Since you can just run Putty without an install, this will be a tough task. When a system runs launches Putty.exe, a registry key `HKLM:\Software\SimonTatham` will be created. But the .exe could be anywhere on that system or on a remotely shared source.

This is an excellent point - PuTTY can be run as a portable application without being locally installed. If that is the case, it will be difficult or impossible to find.

As an alternative, if you are just using PuTTY for remote shell sessions, you may be able to replace it with [PowerShell remoting over SSH](https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core?view=powershell-7) and remove the need for PuTTY.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [August 10, 2020, 2:12pm UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/7 "2020-08-10T14:12:07Z")

</div>

> [@](#):
>
> This is an excellent point – PuTTY can be run as a portable application without being locally installed. If that is the case, it will be difficult or impossible to find.

A client management solution like SCCM could even collect information about local existing not installed executables. 😉

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/finding-computers-that-have-software-installed/14771/8 "2024-05-16T20:29:06Z")

</div>


