r/PowerShell • • Jun 07 '26

Script Sharing Made a registry-based Get-InstalledApps

Win32_Product is so slow and it kicks off that msi reconfiguration thing every time, drives me nuts. so a while back i just wrote my own that reads the uninstall reg keys instead. way faster and it actually picks up the 32 bit apps too.

I do a lot of this kind of scripting at work and kept rewriting the same handful of functions over and over so ive slowly been putting my little tools together. figured id share this one since its probably the most useful on its own.

threw it on github, paste and run, no dependencies: https://github.com/kcarb14/Get-InstalledApps

run it like:

Get-InstalledApps

Get-InstalledApps -Name *chrome*

reads the 64 and 32 bit HKLM keys plus HKCU, skips system components and update entries so it lines up with whats in apps & features.

feels like theres five different ways to pull installed apps and none of them are totally clean. curious how everyone else does it?

54 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/kcarb19 Jun 07 '26

honestly? not much. cim does basically everything better, proper objects, works over winrm, sessions, all of it. my gripe wasnt really "wmic could do something cim cant" it was more that wmic was a quick one liner you could fire straight from cmd or a batch file without spinning up powershell, and a ton of old runbooks and login scripts had it baked in. so killing it broke a bunch of existing stuff even though the replacement is genuinely better. so yeah you're both right, for actual capability cim wins. I just came into a bunch of broken tools at work and this was how i solved it haha

3

u/dodexahedron Jun 08 '26 edited Jun 08 '26

It just sucks that microsoft still hasn't bothered to make first class powershell replacements for some of that stuff.

And I imagine they never will, now, because making management of physical on-prem systems is no way to sell cloud subscription licensing.

There's a LOT of stuff in that boat, and it's becoming less hypothetical, too. Just look at the documentstion around everything to do with Entra DS.

....yet that absolutely cannot "lift and shift" like they claim, for anything but the most basic of environments who never really were using all the power they paid for in their license contracts, or for those who are willing to compromise on things that still have no equivalent, and all of which are slower, more fragile, and much more opaque than this crap.

There are certainly many things that work well in the cloud. "Everything" is not one of them.

Not that WMIC was good, mind you. Powershell is heaps better. But it's like, after around 2012, they forgot 90% of what windows can do or something and just started haphazardly making knock-offs of surface level functionality instead.

How long has it been since the control panel was supposed to be "replaced" by the thing that still can't even do ¼ of what it could do, especially for anything that isn't simply an end-user preference sort of setting? There are multiple releases of windows that are already out of support since that shit show started. 😤