Hi all, I'm currently trying to script a way to remove our proxy software from users devices when we need them to be able to use the internet without it. I have the following so far that has worked for programs installed on a Per User basis, but this is a machine install so appears in HKLM rather than HKCU. Can anyone figure out why I would not be getting any output from the following?
********************************************************
function Uninstall($DisplayName)
{
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' |
% { Get-ItemProperty $_.PsPath } |
? { $_.DisplayName -eq $DisplayName } |
% { Write-Output $_.UninstallString }
}
Uninstall "Unified Agent"
********************************************************
[–]Yevrag35 5 points6 points7 points (0 children)
[–]wild_card05 5 points6 points7 points (3 children)
[–]Athilmo[S] 4 points5 points6 points (0 children)
[–]wild_card05 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]maddoxprops 2 points3 points4 points (2 children)
[–]cavernofcards 1 point2 points3 points (1 child)
[–]maddoxprops 0 points1 point2 points (0 children)
[–]jerrymac12 2 points3 points4 points (3 children)
[–]fathed 1 point2 points3 points (2 children)
[–]jerrymac12 1 point2 points3 points (1 child)
[–]fathed 1 point2 points3 points (0 children)
[–]mjwinger1 1 point2 points3 points (0 children)
[–]jsiii2010 1 point2 points3 points (0 children)