Link to home
Create AccountLog in
Avatar of MongolianNoseFlute
MongolianNoseFluteFlag 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?
Avatar of Lazarus
Lazarus
Flag of United States of America image

If its and MSI file you can use MSIexec. with the /x switch.
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
ASKER CERTIFIED SOLUTION
Avatar of Michael Best
Michael Best
Flag of Japan image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of 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??