Determining if an application is installed using PowerShell...
So I work with a lot of worklets that check for bits of software that are installed. Obviously there are some good examples contained within Automox’s Worklet Catalog. These tend to do the whole search several registry hives for keys containing an application’s display name.
Is there a reason why this approach is taken instead of using, say, Get-Package?
Cheers, Mark
Page 1 / 1
Hello,
I can’t speak exactly why that registry iteration approach was taken, but my understanding is it can be more comprehensive to look directly at the registry vs having it collected through the powershell module. Additionally, I’m taking a look at some of the installation templates and many are doing a secondary check where we look for the uninstallation string.
Personally, I like the Required Software policy in most cases since it doesn’t depend on a powershell script running on the endpoint. The scope of the RS policy iterates through the already collected software packages on the device for a match, no scripting required!
Regards, Mark
Thanks for your insights. In this case I’m attempting to manage updates to .NET runtimes which is rather sensitive on our webservers, otherwise the RS policy would be useful.
If get-package is the preferred detection method and it surfaces exactly the information you need, no harm in utilizing that instead of what is in the templates. :)