Link to home
Start Free TrialLog in
Avatar of #AKS#
#AKS#Flag for India

asked on

Want to uninstall some apps from windows 10 remote machines using PowerShell or .bat logon script

Guys, I have checked some of the articles regarding the requirement I have but nothing worked 100%.. Do you know if we can efficiently use PowerShell to un-install apps from remote machines running on Windows 10 OS platform?

Thanks
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Do you mean Windows 10 UWP apps? or a standard windows application?
What have you tried, so we don't try and reinvent the wheel
Avatar of #AKS#

ASKER

Its for applications other that inbuilt in windows 10.

I tried few commands like below one (in stand alone as well as ps1 script):
Get-AppxPackage *appname* | Remove-AppxPackage  

No Luck..
Avatar of #AKS#

ASKER

MSIExec.exe is not helping in this case may be due to this is a custom developed plugin installed in my machine. Its not a MSI based installer..

Thanks
I see. So you would need to extract the uninstall string from the remote registry and use it: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
are the keys to look at.

See https://msdn.microsoft.com/en-us/library/windows/desktop/aa372105(v=vs.85).aspx for MS on that topic.
Avatar of #AKS#

ASKER

@McKnife, Unfortunately I had already tried searching for uninstall string for the application I am looking for but I was not able to find any uninstall string for that..

I can see Uninstall strings for some security patches as well but for that application..

Thanks
Maybe you didn't notice there are two registry sections to look at, not just one.
Avatar of #AKS#

ASKER

Truly I did not noticed that second one but when I checked it now, the result is same.. No entry there as well...
Well that info is checked by the application wizard if you uninstall software - I am not aware that there is a second location. Please open appwiz.cpl and look at the installed applications - you should find an uninstall string for any application listed.
Avatar of #AKS#

ASKER

in Appwiz.cpl, I can only see tabs like Name, Publisher, Installed on, Size and version .. nothing more there.. As I said, this is a custom developed application..
You misunderstood. I tried to show you (and make you verify) that each application listed at appwiz.cpl will have an uninstall string at the registry locations I mentioned (if it is uninstallable through appwiz.cpl, that is).
Avatar of #AKS#

ASKER

Ohh, my bad.. You said right that if an application is there in appwiz.cpl, it should have an uninstall string in registry but in my case it was not there. thats the point only why I posted this problem on ExpertExchange community.. I can see that application is installed in appwiz.cpl but I cant find the Uninstall string in registry for this application. Additionally, I used a tool called "remote uninstall" by LanSweeper to see if my app can be uninstalled using this tool but the worst magic was, all applications were appearing except the one I wanted...  :(
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial