Avatar of MongolianNoseFlute
MongolianNoseFlute
Flag for Ireland asked on

Removing program from machine remotely

Hi
I need to remove a certain program from 30-50 machines to use an alternative program, Is there a way of doing this remotely and without affecting the users pc?
System Utilities

Avatar of undefined
Last Comment
MongolianNoseFlute

8/22/2022 - Mon
Lazarus

If its and MSI file you can use MSIexec. with the /x switch.
comfortjeanius

Lazarus

You can also use PSexec. with that to do your uninstall remotely using a list like this

psexec \\@PCs.txt Msiexec.exe /q/x{guid} remove=all

where "PCS.TXT"contains list of pcs

pc1
pc2
pc3
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Michael Best

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
MongolianNoseFlute

ASKER
Hi,

I am trying to do this action via Powershell.
http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/14/use-powershell-to-find-and-uninstall-software.aspx

another link i was looking at is - http://stackoverflow.com/questions/113542/how-can-i-uninstall-an-application-using-powershell

However I cannot get this to work correctly.
Im not sure how the following command works..

$app = Get-WmiObject -Class Win32_Product | Where-Object {
    $_.Name -match "Software Name"
}

$app.Uninstall()

I tried this but the command was incorrect not sure what I should use for Software name/ Appname??