I've got a few question that have remained unanswered as I make my way through a Powershell project I'm working on.
My goal, to create a Powershell script that is able to uninstall a ClickOnce deployed C# application, in addition to potentially running various installers(but this part I'll worry about later).
I've been able to figure out how to get the UninstallString for my application, I'm just stuck on what my options are with it. I've tried running it using Invoke-Expression and a few other methods, but nothing yielded results. Since I'm brand new to Powershell chances are good I may have done something wrong, but I'm hoping I just haven't found the right way of doing this. Here is my current snippet of relevant code that I'm using to get my UninstallString:
$App = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" |
foreach { gp $_.PSPath } |
select DisplayName,DisplayVersion,InstallDate,Publisher,UninstallString |
where { $_.DisplayName -match "scan" }
If anyone has suggestions on how to proceed it would be much appreciated!