CHiLL Posted June 24, 2016 Posted June 24, 2016 Hello, I have a PS script that I'd like to run to remove all previous versions of Policy Central except for any that match the current version number. Here's what I have so far: Foreach-Object { Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, UninstallString | Where-Object DisplayName -Like "*Policy Central*" Format-Table –AutoSize} That code presents me with all items named like 'Policy Central' from the Uninstall key from the registry and also displays the version number, we well as the 'Uninstall String'. How can I utilize that uninstall string for each version of Policy Central that does not match a specific version number?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now