

If it displays No installed product keys detected, skip steps 4 and 5 and go to step 6, "Delete the following registry entry", below.

NOTE The output could include licenses for multiple applications. Run the following command to get a list of the licenses currently in use:

If you prefer to perform the steps for the cleanup process manually, use the information in this method. Method: Clear prior activation information manually To remove Workplace Joined accounts: download WPJCleanUp.zip, extract the WPJCleanUp folder, and run WPJCleanUp.cmd.

If you save signoutofwamaccounts.ps1 in the same location as OLicenseCleanup.vbs, then it will be executed automatically when you run OLicenseCleanup.vbs. To clear the WAM accounts on the device that are associated with Office: download the signoutofwamaccounts.zip file, extract, and run the signoutofwamaccounts.ps1 script with elevated permissions.To remove previous licenses and cached account information: download the OLicenseCleanup.zip file, extract the OLicenseCleanup.vbs script, and run it using elevated permissions.Use the “Select if using automated scripts” link to navigate back to this method. For details about the specific steps that each script automates, select the associated Details link. We recommend that you run the OLicenseCleanup.vbs and signoutofwamaccounts.ps1 scripts listed below, while WPJCleanUp.cmd is required only if your device is Workplace Joined. Run the following scripts that automate each section of the process. Method: Use scripts to automate the cleanup process
