HOWTO: Uninstall software remotely using command line

If you need to remove software from a remote machine you can do so using a combination of PSEXEC and MSIEXEC. To uninstall software remotely using the method below, the software needs to have been installed using an MSI file. Since this is a standard deployment method for most commercial packages, this should not be too problematic. Of course, to do this, you also must have administrative rights to the remote machine.

1. Download PSEXEC:

   - Download PSEXEC from Microsoft at Install it onto your computer by copying the file to a directory in your PATH. System32 will do nicely, or you can create a new directory to store your favorite command line tools and add it to your path.

2. Open an administrative command prompt:

   - Open an administrative command prompt on your machine where you have copied PSEXEC.

3. Run the following command:

   - Run the following command:
psexec \\remotecomputername msiexec /x /q pathtotheMSIfile
The UNC path to the remote computer can use either the NetBIOS name or the FQDN. The path to the MSI file must be relative to the machine you are uninstalling the software from. Again, a UNC path works well here. The /x means to uninstall, and /q means to do so without user input (quietly.)
Pro tip: If you use psexec \\* it will run against every computer in the domain!

Also consider using Action1 to uninstall software remotely if:
- You need to perform this action on multiple (hundreds or even thousands) computers simultaneously.
- Some of your endpoints are laptops not connected to corporate network at all times.

Action1 is a cloud-based platform for software deployment, software/hardware inventory, patch management, endpoint configuration and more. It is free with basic functionality.

Other Relevant HOWTOs: