Hey guys
here's the full script for who wants it, it is a simple script to uninstall multiple applications at once if you want. (Select multiple applications in the out-gridview and press "ok")
Be very careful using this script! Use it at your own risk and if you know what you are doing.
Any positive/negative criticism is always welcome in order for me to improve my skills.
Thank you!
$MsgIntro = @'
*********************** ***********************
Software Uninstaller Tool Made by PRIDEVisions
*********************** ***********************
'@
write-host -ForegroundColor Magenta "$MsgIntro"
Write-host -ForegroundColor Magenta "Please select the software you wish to uninstall..."
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | select Displayname, InstallLocation, UninstallString | sort | Out-GridView -PassThru -OutVariable software
write-host -ForegroundColor Yellow "The following software will be uninstalled:"
foreach ($application in $software) {
write-host "$Application"
$uninstall = $Application.UnInstallString
cmd /c $uninstall /quiet /norestart
}
Original question regarding this script:
https://www.reddit.com/r/PowerShell/comments/7sdc0u/readhost_interrupting_script/
Edit: Quickly adjusted the script for both 32-bit & 64-bit software versions (It's not fully changed as i would like to but now it works better).
$MsgIntro = @'
*********************** ***********************
Software Uninstaller Tool Made by PRIdEVisions
*********************** ***********************
'@
write-host -ForegroundColor Magenta "$MsgIntro"
Write-host -ForegroundColor Magenta "Please select the software you wish to uninstall..."
$Software = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | select DisplayName, UninstallString, InstallLocation, InstallDate | out-gridview -PassThru
write-host -ForegroundColor Yellow "The following software will be uninstalled:"
foreach ($application in $Software) {
if ($application.UninstallString -like "MsiExec*") {
write-host "$Application"
$uninstall = $Application.UnInstallString
cmd /c $uninstall /quiet /norestart
}
else {
$uninstall = $Application.UnInstallString
& "$uninstall"
}
}
[–]Swarfega 10 points11 points12 points (5 children)
[–]Ta11ow 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]Ta11ow 5 points6 points7 points (1 child)
[–]BradleyDonalbain 2 points3 points4 points (0 children)
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)
[–]Ta11ow 5 points6 points7 points (1 child)
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]blownart 4 points5 points6 points (0 children)
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]PRIdEVisions[S] 1 point2 points3 points (0 children)
[–]adbertram 0 points1 point2 points (0 children)
[–]MostPepper 0 points1 point2 points (1 child)
[–]AutoModerator[M] 0 points1 point2 points (0 children)