How to Remove the OneDrive Photos App with Intune

If you manage Windows 11 devices, you may have recently noticed a new application appearing called OneDrive Photos.

At first glance, it looks like a new application that has been installed on your devices. You can find it proudly displaying itself in the Start Menu, even on Windows 11 Enterprise machines, wild.

In an enterprise environment, chances are you don’t actually want this app installed, especially since it only supports Personal Microsoft accounts anyway (which we block in our environment).

So the question is…

How do I remove OneDrive Photos?

Firstly, do not remove OneDrive.App.exe.

OneDrive Photos is not a standalone application that can be uninstalled. It is a component of the Microsoft OneDrive desktop client.

If we removed the app entirely then we could introduce future compatibility issues that may impact other OneDrive components, we want to avoid that.

Quick Answer: Remove OneDrive Photos with Intune Remediations

The safest approach is:

  • Keep the Microsoft OneDrive client installed
  • Keep OneDrive.App.exe
  • Remove only the OneDrive Photos shortcut

We can use a Intune Detection/Remediation to achieve this.
I’ve created the below scripts to remove the shortcut only.

Detection Script:

PowerShell
$paths = @(
    "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\OneDrive Photos.lnk",
    "$env:PUBLIC\Desktop\OneDrive Photos.lnk"
)

foreach ($path in $paths) {
    if (Test-Path $path) {
        exit 1
    }
}

Get-ChildItem "C:\Users" -Directory | ForEach-Object {

    $shortcut = "$($_.FullName)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive Photos.lnk"

    if (Test-Path $shortcut) {
        exit 1
    }

}

exit 0

Remediation Script

PowerShell
$paths = @(
    "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\OneDrive Photos.lnk",
    "$env:PUBLIC\Desktop\OneDrive Photos.lnk"
)

Get-ChildItem "C:\Users" -Directory | ForEach-Object {

    $paths += "$($_.FullName)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive Photos.lnk"

}

foreach ($path in $paths) {

    if (Test-Path $path) {

        Remove-Item $path -Force

        Write-Output "Removed: $path"

    }

}

exit 0

So what Is OneDrive Photos?

During investigation, the first assumption was that this was another Windows Store application.

However, checking the shortcut properties showed something different, the shortcut launches:

C:\Program Files\Microsoft OneDrive\OneDrive.App.exe

And opening this app manually takes you the same OneDrive Photos application and UI as the shortcut does.

OneDrive.exe vs OneDrive.App.exe

The confusing part is that OneDrive installations now contain multiple executables.

The traditional OneDrive sync client is:

C:\Program Files\Microsoft OneDrive\OneDrive.exe

This is responsible for:

  • OneDrive synchronisation
  • Files On-Demand
  • Sync status
  • Account configuration
  • SharePoint library sync

The newer application component is:

C:\Program Files\Microsoft OneDrive\OneDrive.App.exe

This is used for newer OneDrive experiences, including the OneDrive Photos experience.

No doubt Microsoft has more “experiences” planned to integrate with OneDrive.App.exe in the future.

Why Not Delete OneDrive.App.exe?

A tempting solution is:

Remove-Item "C:\Program Files\Microsoft OneDrive\OneDrive.App.exe"

This can be done, and may even work fine, Redditor NickyDeWestelinck actually created a remediation script that does just that.

However, this is not the route I’d take in a large organisation.
At this point I’d prefer to stay on the safe side and only remove the shortcut from machines.

Chances are Microsoft (eventually) will release a dedicated Intune policy or Settings Catalog option that allows OneDrive experiences to be disabled entirely.

This keeps things in a better “supported” state which helps in the event we have any Microsoft 365/OneDrive issues in the future.

Validation

Of course, do testing in your own environment before deployment, but from my end I observed the below after deploying my remediation:

  • OneDrive sync continued operating normally
  • SharePoint libraries were unaffected
  • Files On-Demand continued working
  • Personal OneDrive restrictions remained enforced
  • The OneDrive Photos shortcut disappeared

There is no guarantee that the shortcut won’t reappear with future Windows updates/servicing, so it’s recommended to use a schedule on the remediation to catch it and remove it again if it reappears.

Lessons Learned

It seems that Microsoft continues to introduce changes that do not always respect existing enterprise configuration controls.

We already had AllowWindowsConsumerFeatures disabled on all our endpoints, yet they still received this OneDrive update with no way to opt out.

The community isn’t happy, and Enterprise IT teams are not to blame here.

As with anything Microsoft/Windows, staying up to date with forums and online communities is important to catch things like this, that way the user impact can be fully understood and we (as IT) can be in a good position to respond.

Cheers,

Chris

🙉 Wanna know when I post?

I don’t spam! – Just one email, every once in a while, when there’s a new post.

Sharing is caring!

Comments

Note: any comments identifying companies or individuals discussed above will not be approved.

Leave a Reply

Your email address will not be published. Required fields are marked *