Here are 2 quick lines of code that help you uninstall a Program:

$Prog = Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -match “ProgramName”}
$Prog.Uninstall()