Issues with uninstalling Microsoft Office 2010 using powershell 3.0

Hi all,

We are trying to uninstall Office 2010 pro using Microsoft Powershell 3.0. We are using the following code:

Get-WmiObject -Class win32_product | where {$_.name -like "*Office*"}

$Office = Get-WmiObject -Class win32_product | where {$_.name -like "*IdentifyingNumber*"}

msiexec /uninstall $Office.LocalPackage /passive

The issue that we have is in order to uninstall office correctly, we have to define each identifying number of Office which is tedious. Is there an easier way to install the entire package?

Thanks

August 22nd, 2013 8:56pm

When automating the removal of Office 2007/2010, we need to call setup.exe to perform the work.
Because Office 2007/2010 is a multi-msi based product we cannot use msiexec for the installation, nor the uninstallation of Office 2007/2010.

The following link is a good mothod to remove the Office 2007, but it also apply to Office 2010:

http://blogs.technet.com/b/odsupport/archive/2011/04/07/how-to-automate-the-uninstallation-of-office-2007-products-via-command-line.aspx

Hope this helps.

More information:

How to perform an uninstall-upgrade to Office 2010

http://blogs.technet.com/b/odsupport/archive/2011/04/06/how-to-perform-an-uninstall-upgrade-to-office-2010.aspx

How to uninstall Office 2003, Office 2007 or Office 2010 suites if you cannot uninstall it from Control Panel? (dispatch Fixit package to client)

http://support.microsoft.com/kb/971179/en-us

Tony Chen
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2013 6:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics