I am working with a bunch of computers that were imaged by someone who removed all the built-in Windows 10 apps -- including the Microsoft Store app. Whoever removed them didn't just uninstall them with a simple
Remove-AppxPackage command; they actually de-provisioned those apps entirely with
Remove-AppxProvisionedPackage, so the package files are not even on the drives anymore to be reinstalled via
I've figured out how to get Skype and OneDrive back (standalone versions of those can be downloaded from Microsoft's web site), but I cannot figure out how to get OneNote back. The standalone package on Microsoft's site as well as the version that comes with Office 365 is OneNote 2016, which is not the same version. All the Googling I do on the subject just keeps regurgitating Microsoft's instructions on how to get it from the app store. I really do not want to have to reinstall Windows from scratch on all these computers.
What I've tried:
Most of the users are on 1803 or 1809, but upgrading to 1903 doesn't resolve anything.
I tried copying the OneNote package from a Windows 10 ISO and reinstalling it with
Add-AppxPackage -register <path to AppxManifest.xml> -DisableDeveloperMode, but it barfs back at me that
AppxManifest.xml is not in the package root. This happens even when I copy the files to %PROGRAMFILES%\WindowsApps (which is not easy to do).
I tried using
Add-AppxProvisionedPackage, but this command requires a
.main file, which doesn't exist in a stock Windows image (and I don't know how to obtain the OneNote.appx file either).
I then tried manually forcing it by copying the files AND registry settings off a reference PC. This time,
Add-AppxPackage says it installed it and I get a Start Menu icon for it, but it doesn't work (the OneNote splash screen comes up briefly before disappearing again).
I can't believe Microsoft allows you to paint yourself into a corner like this.
Is there any way to restore OneNote?
Please note, the solution has to be scriptable, so doing a repair/refresh of Windows 10 is out (I may as well just re-image all these computers and do it right at that point).