Implementing OneDrive is crucial to your modern workplace journey but not monitoring OneDrive will come back to bite you. Isn’t that beautiful? You are going to see all of the sync errors that are occurring on all of your enrolled Endpoints even when it was last synced! I can’t be happier!Ī final note: Beware… it could take up to 3 days before any of your devices shows up make sure your Onedrive is up to date because you will need to use the OneDrive Sync app version 21.078 Now let’s take a look at what the OneDrive Sync health is telling us! Make sure you apply this policy to all devices you want to monitor, I guess that means all of your devices… When you have copied this key, open your Intune administrative templates again and search for “ Sync Admin Reports” and paste the key. ![]() Open the settings menu and generate a new tenant association key. If you end up with zero devices, you will still need to do some manual labour before it starts working. Go open and log in with your credentials, you will notice a new tab has appeared: “Onedrive Sync”Īs shown above, I now have 17 devices. Write-host "Onedrive is really really really broken! Onedrive is $resulttext | Last sync time:$difference hours ago | Beware, possible syncing problems detected"įinally, there is a new possibility/option created by Microsoft themselves to start monitoring your OneDrive clients! Write-host "Onedrive is working great! Onedrive is $resulttext and there are no syncing problems" Write-host "User logged in but Onedrive is not running!"Įlseif ($state -eq "True" -and $difference -le 24 -and $unt -gt 0 -and $checkprocess -match "True") Skipping OneDrive monitoring."Įlseif ($checkprocess -eq $false -and $userloggedin -eq $true) Write-host "No azuread user is logged on. $TimeSpan = new-timespan -start $datumnow -end $convertdate $files = Get-ChildItem -Path $folderMask -Filter SyncDiagnostics.log | Where-Object $folderMask = "C:\Users\*\AppData\Local\Microsoft\OneDrive\logs\Business1\*.*" #Search onedrive logs in the user folders I need to test it some more… but here it is. Of course, this is my first beta script so it’s not perfect yet. When using Solarwinds you can create some PowerShell scripts to begin monitoring OneDrive. Compare current time and the Timestamp to get the difference.So now we have some information to begin monitoring but we still need to check some other information. Or the value: syncprogressstate, just does not exist….After some tests to break OneDrive I noticed some things. So getting the error codes can be a little bit hard. ![]() It’s a funny thing, syncprogressstate is nowhere mentioned in Microsoft’s documentation. This syncdiagnostic.log will show you some important things. Luckily there is some kind of log file in the user’s local AppData folder. Monitoring your user’s OneDrive can be a true pain because there are no event logs or register values you can monitor to make sure OneDrive is working. I will show you the 2 options you have to start monitoring OneDrive on your endpoints How I Learned to Stop Worrying and Love OneDrive
0 Comments
Leave a Reply. |