Need to use PowerShell to remove Windows 11 preloaded version of Microsoft 365.

Woody Chiu at RASI 226 Reputation points
2023-03-19T19:21:46.22+00:00

We are deploying about 150 Lenovo Windows 11 machines using Intune. We want to ensure the machine OS environment is clean without junk applications. We notice that there are two versions of Microsoft 365 appearing in Windows 11. "Microsoft 365 - en-us" appears in Apps and Features of Windows 11 is the Windows 11 preloaded version, and that is the version we want to uninstall hopefully using PS script during Intune Autopilot for all machines. We do have another Intune AutoPilot deployed version of Microsoft 365 appearing as "Microsoft 365 Apps for enterprise - en-us". That is the one we need to keep.

I have tried all different ways of PowerShell and the preloaded version still sticking around. I need a bit of insight from Microsoft on what would be the proper way to proceed with what I need to do. I know both versions are Click-to-Run versions. Would that have anything to do with I was not able to remove/uninstall the preloaded Microsoft 365 the way that I thought I would have been able to?

Your advice will be very much appreciated!

Woody

Microsoft 365 and Office Install, redeem, activate For business Windows
Microsoft Security Intune Other
Microsoft Teams Microsoft Teams for business Other
{count} votes

3 answers

Sort by: Most helpful
  1. Sedat SALMAN 14,180 Reputation points MVP
    2023-03-19T20:44:35.5633333+00:00

    It's possible that the preloaded version of Microsoft 365 is part of the Windows 11 image and cannot be removed using PowerShell. In this case, you may need to create a custom Windows 11 image that does not include the preloaded version of Microsoft 365.

    However, if you want to remove the preloaded version of Microsoft 365 using PowerShell, you can try the following steps:

    1. Open PowerShell as an administrator on the Windows 11 machine.
    2. Run the command "Get-AppxPackage -AllUsers" to list all installed apps for all users on the machine.
    3. Find the preloaded version of Microsoft 365 in the list. You can use the "Name" or "PackageFullName" properties to identify it. For example, it may be named "Microsoft.Office.Desktop" or "Microsoft.MicrosoftOfficeHub".
    4. Run the command "Remove-AppxPackage -Package <PackageFullName>" to remove the preloaded version of Microsoft 365. Replace "<PackageFullName>" with the actual PackageFullName value for the app you want to remove.

    Note that removing the preloaded version of Microsoft 365 may cause compatibility issues with other apps or features in Windows 11. Also, keep in mind that removing the preloaded version of Microsoft 365 may not be officially supported by Microsoft and may void any warranties or support agreements for the Windows 11 installation.

    1 person found this answer helpful.
    0 comments No comments

  2. abbodi86 4,036 Reputation points
    2023-03-20T02:44:55.42+00:00

    "Get-AppXPackage -Name '*Microsoft.Office.Desktop*' | Foreach {Remove-AppxPackage $_.PackageFullName}"

    "Get-AppXProvisionedPackage -Online | Where DisplayName -Like '*Microsoft.Office.Desktop*' | Remove-AppXProvisionedPackage -Online"

    0 comments No comments

  3. Richard J 0 Reputation points
    2023-05-15T15:44:01.1266667+00:00

    The solutions presented do not work. In Windows 11 the pre-installed version of office doesn't show up in Get-AppXPackage with or without the -Online parameter. There might be a way to script it but I haven't found it yet and i've been looking for 2 whole days. the only way I can see is to go to each computer and manually uninstall all 6 versions so that will allow me to install an older version.

    Sarcasm: Thanks Microsoft for making something that should be simple, irritatingly complex for us administrators.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.