• discusseded
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    8 months ago

    Run a PowerShell session as admin and enter the following commands:

    Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -match “OneDrive” } | Remove-AppxProvisionedPackage -Online -AllUsers

    Get-AppxPackage -AllUsers | Where-Object { $_.Name -match “OneDrive” } | Remove-AppxPackage -AllUsers

    Might be easier to do this in PowerShell ISE so you can edit these two commands. But this will first remove the installer package for OneDrive so that it can’t reinstall again, and then it removes the installed app from all profiles.

    I haven’t personally tested this, but I use PowerShell professionally and the commands are solid. If it didn’t work then it just means that Microsoft packaged OneDrive in a different manner than the other built-in apps. You can also remove other annoying apps that are pre-loaded this way. Just swap out “OneDrive” for the proper name or partial proper name of the appx app. Use Get-AppxPackage by itself to learn what the proper names are for the apps that are installed.