Quite often when buying a new PC or laptop it will come with Office 365 installed. Often it comes with multiple language installs. This can particularly be a problem when having to switch architecture installs. For example removing all 64 bit versions of Office as 32 bit Office is needed for a legacy app
So what is the easiest way to resolve this?
- Manually go into program and features and uninstall every instance. This takes patience as this will take a while
- Reinstall Windows using a clean image. Get rid of all the Office 365 instances and bloatware in one go and use a fresh installer downloaded from Microsoft
- Run a PowerShell Script to remove all instances
PowerShell Script
To use a PowerShell Script to uninstall all Office 365 and OneNote instances, I used the below which is based on a script I found on GitHub here
The script comes in two stages
Uninstall all Office Instances
Set-ExecutionPolicy Unrestricted -Force
$OfficeUninstallStrings = (Get-ItemProperty HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\* | Where {$\_.DisplayName -like "Microsoft 365"} | Select UninstallString).UninstallString
ForEach ($UninstallString in $OfficeUninstallStrings) { $UninstallEXE = ($UninstallString -split '"')\[1\] $UninstallArg = ($UninstallString -split '"')\[2\] + " DisplayLevel=False" Start-Process -FilePath $UninstallEXE -ArgumentList $UninstallArg -Wait }
Uninstall all OneNote Instances
Set-ExecutionPolicy Unrestricted -Force
$OneNoteUninstallStrings = (Get-ItemProperty HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\* | Where {$\_.DisplayName -like "Microsoft OneNote"} | Select UninstallString).UninstallString
ForEach ($UninstallString in $OneNoteUninstallStrings) { $UninstallEXE = ($UninstallString -split '"')\[1\] $UninstallArg = ($UninstallString -split '"')\[2\] + " DisplayLevel=False" Start-Process -FilePath $UninstallEXE -ArgumentList $UninstallArg -Wait }
Once completed and all instances have been removed, you can install the office variation of your choice, whether a different architecture or another version such as Office 2024 Home and Business.
You can of course also restrict the PowerShell Execution Policy afterwards to keep your systems secure
