Skip to content

Instantly share code, notes, and snippets.

@josy1024
Last active December 12, 2015 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josy1024/c654fccb3d21df0d275d to your computer and use it in GitHub Desktop.
Save josy1024/c654fccb3d21df0d275d to your computer and use it in GitHub Desktop.
remove old programs installed befor 2010
# author: josy1024@gmail.com
# 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