Mastering PowerShell: Uninstalling Software Made Easy
Vložit
- čas přidán 16. 07. 2024
- In this video, we'll show you how to use PowerShell to quickly and easily uninstall the software from your Windows computer. Specifically, we'll walk you through the steps to uninstall Microsoft Visual C++ 2010 using a simple script. By the end of this tutorial, you'll have a better understanding of how to leverage PowerShell to streamline your software management tasks and keep your computer running smoothly
The finished script can be found: github.com/HealisticEngineer/...
Music I use: Bensound.com
License code: XGFA9HQMSFD2BHFZ
Follow us on
Twitter - / tipsforitpros
Facebook - / tipsforitpros
0:00 Introduction
0:38 Script Building
5:12 Finished script - Věda a technologie
this is really great.. showing all in terminal :) and yet make it look simple to follow .. .great resource .. keep up the good work. :)
Glad you liked it
Thanks , this is very helpful
Great!
What if the software is not shown in the list. Where would I find it and would I still use the same command line if the software is on the computer but not in the list?
Bro use registry path instead of wmi win32 object
how would you do this for multiple apps you want to uninstall? for example, i got new dell laptops, i want to uninstall all the bloatware (dell apps, microsoft apps, etc
An easy option could be to set an array with the software you want to remove and pipe that into foreach-object, as uninstall can only run concurrent anyway.
@@TipsForITPros I ended up just using BCU. A lot of the apps im trying to uninstall cant be done quietly, so any script that i run it just errors out. Im uninstalling microsoft and dell apps from new laptops.
Hi Sir, Good day ! How about uninstalling a specific software to multiple machines is that possible ?
$computers = @("PC1", "PC2", "PC3")
$software = "NameOfSoftware"
function Invoke-RemoteCommand {
param (
[string]$computerName,
[string]$software
)
try {
Invoke-Command -ComputerName $computerName -ScriptBlock {
param ($software)
# insert uninstall Code Here
} -ArgumentList $software
} catch {
Write-Error "Operation failed on computer $computerName: $_"
}
}
# foreach Computer and use the function
foreach ($computer in $computers) {
Invoke-RemoteCommand -computerName $computer -software $software
}
Yep. Great, but also you didn't mentioned the "winget" command. It almost like "apt" or "yum" in linux. Much simpler to use.
I didn’t mention it because in Linux you can change package manager and it presents on both desktop and server, sadly Winget is only on desktop.
If you need to manage both desktop and servers, chocolatey is still a better option.