cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnathonnehls
Ctrl-Alt-Del
Posts: 5
Registered: ‎09-24-2018
Location: US
Views: 1,776
Message 1 of 8

Office 365 Preinstalled Apps Causing Problems

Our company just purchased multiple P52's.  We uninstalled Office 365 Apps before doing anything else.  We then installed all apps we needed and joined to our domain.  Now when any user logs in for the first time The Office 365 apps appear.  We use our own Office with volume licensing.  When we go to share a sporeadsheet within excel, it gives an error that an email acount isnt setup.  We then have to go uninstall all those Office 365 apps again for each user that signs in for the first time.  Is ther anyway to stop this without having to do a fresh Windows install from our volume licensing?

 

Thank you in advance.

Lenovo Staff
Lenovo Staff
Posts: 5,416
Registered: ‎10-29-2009
Location: NC
Views: 1,743
Message 2 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I understand that you want to uninstall the preloaded version of Office 365 for both the currently logged-on user as well as any other user that logs on the machine in the future.  Office 365 is a store application so the methods to install/uninstall it are different than what you might be used to with desktop apps.  To completely uninstall preloaded store apps, 2 steps are needed:

https://docs.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=win10-ps

https://docs.microsoft.com/en-us/powershell/module/dism/remove-appxprovisionedpackage?view=win10-ps

 

You can put the below text into a powershell script and execute it as an administrator:

---------------

 

$AppToRemove = "Microsoft.Office.*"

Get-AppxPackage | where {$_.Name -like $AppToRemove} | Remove-AppxPackage -ErrorAction SilentlyContinue
Get-AppxProvisionedPackage -Online | where {$_.PackageName -like $AppToRemove} | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue

 

 

johnathonnehls
Ctrl-Alt-Del
Posts: 5
Registered: ‎09-24-2018
Location: US
Views: 1,740
Message 3 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I ran the powershell script, however none of the Office 365 apps uninstalled.  And when a new user logged on, Office 365 also installed.  Thank you

Lenovo Staff
Lenovo Staff
Posts: 5,416
Registered: ‎10-29-2009
Location: NC
Views: 1,738
Message 4 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I tested it here before I posted it.  It works here.  Did you run it as administrator?  Did any errors appear in the powershell window?

johnathonnehls
Ctrl-Alt-Del
Posts: 5
Registered: ‎09-24-2018
Location: US
Views: 1,728
Message 5 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I did run as admin I got the folowing...

Remove-AppxProvisionedPackage : Access is denied.
At line:3 char:82
+ ... ToRemove} | Remove-AppxProvisionedPackage -Online -ErrorAction Silent ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Smiley Happy [Remove-AppxProvisionedPackage], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand

Lenovo Staff
Lenovo Staff
Posts: 5,416
Registered: ‎10-29-2009
Location: NC
Views: 1,704
Message 6 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I have retested and I don't see that error here.  Anyway, I have created a .ps1 script and added some messaging to display which apps are being removed.  Please run it as administrator, if there is still a problem, post the output here.

 

 

Lenovo Staff
Lenovo Staff
Posts: 5,416
Registered: ‎10-29-2009
Location: NC
Views: 1,698
Message 7 of 8

Re: Office 365 Preinstalled Apps Causing Problems

You should see output like this:

 

 

PS C:\users\test\Desktop> Set-ExecutionPolicy Unrestricted
PS C:\users\test\Desktop> .\uninstall_preloaded_office.ps1
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\users\test\Desktop\uninstall_preloaded_office.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): r
Removing package: Microsoft.Office.Desktop_16010.9126.2116.0_x86__8wekyb3d8bbwe
Removing package: Microsoft.Office.OneNote_17.8827.20991.0_x64__8wekyb3d8bbwe
Removing package: Microsoft.MicrosoftOfficeHub_17.8918.5926.0_x64__8wekyb3d8bbwe
Removing provisioned package: Microsoft.MicrosoftOfficeHub_2017.1219.520.0_neutral_~_8wekyb3d8bbwe

Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.Access_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.Excel_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.Outlook_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.PowerPoint_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.Publisher_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop.Word_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.Desktop_16010.9126.2116.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
Removing provisioned package: Microsoft.Office.OneNote_2015.8827.20991.0_neutral_~_8wekyb3d8bbwe
Path          :
Online        : True
RestartNeeded : False
 
johnathonnehls
Ctrl-Alt-Del
Posts: 5
Registered: ‎09-24-2018
Location: US
Views: 1,691
Message 8 of 8

Re: Office 365 Preinstalled Apps Causing Problems

I think we are good..  I did a restart and tried again. Its now working.  Thank you for your help!

Check out current deals!


Shop current deals

Top Kudoed Authors