Force show OneDrive login.

In some cases (eg. if the logon information becomes corrupted do to overlapping personal/365 users) then there may be an error everytime OneDrive is open. This can persist across uninstalls/re-installs. To force the login window to display so the user can login, run this powershell script.

$LoggedOnUser = "$Env:USERNAME@Contoso.com" & $Env:LOCALAPPDATA\Microsoft\OneDrive\Onedrive.exe /odopen://sync?useremail="$LoggedOnUser"

This will open the login window for OneDrive, allowing the user to enter the correct account.
Creation date: 11/1/2021 10:04 AM      Updated: 11/1/2021 10:04 AM