Tuesday, April 3, 2018

Uninstall Office 365 via script

I had trouble finding this, so I'm documenting here. Need to uninstall Office 365? Here you go.

Create an uninstall.xml file:
<Configuration>
<Display Level="None" AcceptEULA="True" />
<Property Name="FORCEAPPSHUTDOWN" Value="True" />
<Remove>
    <Product ID="O365ProPlusRetail">
      <Language ID="en-us" />
    </Product>
</Remove>
</Configuration>

Create a batch file with the following:
set loc=%~dp0
"%loc%setup.exe" /configure "%loc%uninstall.xml"