# Remotely list programs and Features on computer exactly as in appwiz.cpl

**URL:** <https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572>\
**Category:** PowerShell Help\
**Created:** [September 20, 2021, 6:26pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572 "2021-09-20T18:26:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul20](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@Rahul20](https://forums.powershell.org/u/Rahul20)\
**Post date:** [September 20, 2021, 6:26pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/1 "2021-09-20T18:26:46Z")

</div>

Hello everyone,

Could you please help me on below, I am struck.

```auto
$list=@()
$css= @"
<style>
h1, h5, th { text-align: center; font-family: Segoe UI; }
h3 {font: bold 15px arial, serif;color: #336699; text-align: left;}
table { margin: auto; font-family: Segoe UI; box-shadow: 10px 10px 5px #888; border: thin ridge grey; }
th { background: #0046c3; color: #fff; max-width: 400px; padding: 5px 10px; }
td { font-size: 11px; padding: 5px 20px; color: #000; }
tr { background: #b8d1f3; }
tr:nth-child(even) { background: #dae5f4; }
tr:nth-child(odd) { background: #b8d1f3; }
</style>
"@

$pcname = "mywinpc"
$InstalledSoftwareKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
$InstalledSoftware=[microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$pcname)
$RegistryKey=$InstalledSoftware.OpenSubKey($InstalledSoftwareKey)
$SubKeys=$RegistryKey.GetSubKeyNames()
Foreach ($key in $SubKeys){
$thisKey=$InstalledSoftwareKey+"\\"+$key
$thisSubKey=$InstalledSoftware.OpenSubKey($thisKey)
$obj = New-Object PSObject
$obj | Add-Member -MemberType NoteProperty -Name "MachineName" -Value $pcname
$obj | Add-Member -MemberType NoteProperty -Name "Name" -Value $($thisSubKey.GetValue("DisplayName"))
$obj | Add-Member -MemberType NoteProperty -Name "Publisher" -Value $($thisSubKey.GetValue("Publisher"))
$obj | Add-Member -MemberType NoteProperty -Name "Version" -Value $($thisSubKey.GetValue("DisplayVersion"))

$list += $obj
}
$list | where { $_.Name } | Sort Name|select MachineName, Name, Publisher, Version |ConvertTo-Html -Head $css -Property *|Out-File .\Programs.html

```

I am trying to get the same report, but the date and other properties seems to be missing, any help would e greatly appreciated. Thanks

---

<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:** [September 20, 2021, 7:08pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/2 "2021-09-20T19:08:26Z")

</div>

What you see in your control panel is a filtered assembly from several different sources. An easy way to come close to a similar list is by using WMI / CIM:

```auto
$Win32ProductList = Get-CimInstance -ClassName Win32_Product
$Win32ProductList | Select-Object -Property Name, Vendor, InstallDate, Version

```

---

<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:** [September 20, 2021, 7:39pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/3 "2021-09-20T19:39:58Z")

</div>

Just an FYI, Win32\_Product has it’s drawbacks, the worst of them being that on Windows 10, it triggers a “repair” on every product which takes forever. Just google “win32\_product bad idea” for more details.

I wound up writing a function that enumerates both the 64bit and 32bit registry entries, removes duplicates, then pipes that through “Convert-ToHTML”. I could not afford to wait the time Win32\_Product takes to enumerate when there might be 100’s of products installed.

Just my $.02

---

<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:** [September 20, 2021, 7:47pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/4 "2021-09-20T19:47:54Z")

</div>

> [@tonyd](#):
>
> Win32\_Product has it’s drawbacks, the worst of them being that on Windows 10, it triggers a “repair” on every product which takes forever. Just google “win32\_product bad idea” for more details.

I never needed to create a software inventory like this with PowerShell but when I tried to use Win32\_Product I’ve never experienced any problems besides the lack of speed generating the list.

Anyway, I think there are a ton of examples for tasks like this out there and I suspect @Rahul20 just picked the worst one of them. 😉 Depending on the purpose of the task there are probably better options than that. To be more helpful we should have more information about the “end goal”. 😉

---

<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:** [September 20, 2021, 7:53pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/5 "2021-09-20T19:53:31Z")

</div>

Makes sense Olaf. I tried to use it, but the systems I was auditing had over 300 (many over 400) products installed and just this one section of my audit was taking 20+ minutes per system. When I went to the registry approach, it literally went down to a few seconds at best. The original post stated they want the result to look just like Appwiz.CPL … my approach does not do that. I piped the output through Convert-ToHTML. My interest was to sort by date and include the DisplayName, Version, Install Date, Publisher and any comments. I was able to grab all that from the registry.

> **[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....

---

<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:** [September 20, 2021, 8:11pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/6 "2021-09-20T20:11:49Z")

</div>

I tried it on my machine with about 200 products listed and it did not take 30 seconds. I’d expect most of times it does not matter how long it takes for such a task. In a production environment I wouldn’t use this “_direct remot_e” approach as it has other disadvantages. I’d rather set up a task locally on the remote machines generating the list and deliver it to a central share if there is no other dedicated product in place handling this type of task like SCCM for example.

---

<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:** [September 20, 2021, 8:13pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/7 "2021-09-20T20:13:08Z")

</div>

Understood … and makes sense. Thanks.

---

<div class="post-metadata">

**Author:** ![Rahul20](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@Rahul20](https://forums.powershell.org/u/Rahul20)\
**Post date:** [September 20, 2021, 11:30pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/8 "2021-09-20T23:30:08Z")

</div>

yeah @tonyd , its taking longer time, can you please help me how can I achieve this

---

<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:** [September 21, 2021, 4:57pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/9 "2021-09-21T16:57:03Z")

</div>

It looks like you are already using the registry approach which is the same method I used. What is your issue? The only difference between what I did and what you posted is that you are not enumerating both the 32bit and 64bit registry. Just add this to your script for 32bit entries:

‘SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall’

---

<div class="post-metadata">

**Author:** ![Rahul20](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@Rahul20](https://forums.powershell.org/u/Rahul20)\
**Post date:** [September 21, 2021, 9:34pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/10 "2021-09-21T21:34:01Z")

</div>

thanks for the suggestion @tonyd

---

<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:21pm UTC](https://forums.powershell.org/t/remotely-list-programs-and-features-on-computer-exactly-as-in-appwiz-cpl/17572/11 "2024-05-16T20:21:22Z")

</div>


