Last active
December 12, 2015 09:41
-
-
Save josy1024/c654fccb3d21df0d275d to your computer and use it in GitHub Desktop.
remove old programs installed befor 2010
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: [email protected] | |
# 2015_12_12 | |
# source: https://gist.github.com/josy1024/c654fccb3d21df0d275d/ | |
# http://josy1024.blogspot.co.at/2015/06/automated-uninstall-of-old-programs.html | |
#remove old programs: | |
#PS > | |
( Get-WmiObject -Class Win32_Product -ComputerName . | Where-Object -FilterScript {$_.InstallDate -lt "20100000"} | Where-Object -FilterScript {$_.Name -NotLike "windows*"} | Where-Object -FilterScript {$_.Name -NotLike "Microsoft*"} | Where-Object -FilterScript {$_.Name -NotLike "AMD*"} | Where-Object -FilterScript {$_.Name -NotLike ""} ).Uninstall() | |
# remove all microsoft visualstudio programs:( Get-WmiObject -Class Win32_Product -ComputerName . | Where-Object -FilterScript {$_.Name -Like "Microsoft Visual*"} ).Uninstall() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment