Hey everyone!
Glad to see there is a community for PowerShell to help everyone!
I had some problems with a script I’ve made with PS.
I’ve wrote a script that uninstall programs from your Appwiz.cpl but unfortunately it doesn’t work.
At the start of the script I’ve asked the computer to show me all of my installed programs, and than to uninstall a programs according to name I give the script.
The thing is that the script show me that the program is uninstalled even after it shows the program on the script that shows me the installed programs!
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
With this command line you only catch 64 bit applications. You are aware of that, aren’t you?
I wouldn’t limit the output to DisplayName though. You could do this later on if needed.
Why again? You did not change anything. So it will be the same. So that command line is superfluous.
If you hadn’t limitted the output of the first command you’d already have all the needed properties already.
And … !!! Attention - not all uninstall strings uninstall their according program. Some of them just run the according setup executable. !!!
Now you’re starting a new command line interface from inside the command line interface. Why?
And … !!! Attention - not all setup executables will process the command line argument /quiet. !!!
That’s the part I don’t get. If you did uninstall an application you will have to re-run the query for the installed applications to get an updated list.
Regardless of all that - what you asked for is a very common and easy task. It has been asked for thousand times and it has been answered thousand times already. Use your prefered internet search engine to search for examples you can adapt to your particular needs. You don’t need the re-invent the wheel again.
Hi olaf!
Thank you for the quick response, I will look for scripts for that in the our forum and learn from them and from your comments!
Im a NewB in poweshell so im trying to learn the language…