OneDrive

Automatically Move OneNote Notebooks into OneDrive

Microsoft held their annual Ignite conference last week and I was fortunate to be able to attend this year. One of the coolest features (cool is relative) that was teased is the ability for the OneDrive sync client to automatically import OneNote notebooks into OneDrive. The current behavior is not ideal, if you enable PC Folder Backup (Formerly Known Folder Move), the UI tells you that you must manually move your OneNote notebooks into OneDrive using OneNote before allowing you to turn on the backup and gives a link to an article that doesn’t do a great job of explaining exactly what to do. Alternatively, if you move your .one and .onetoc2 files into a folder your syncing with OneDrive using File Explorer the next time you open the notebook there will be a good chance that you’ll see an error across the top of OneNote that says something to the effect of “your notebook is in archival format”. Not great.

OneNote auto import (I’m not sure if this feature has an official name, I’ll call it OneNote auto import for now) to the rescue! In the session BRK3262: Microsoft OneDrive deployment and adoption deep-dive Gaia Carini demonstrates the new OneNote auto import feature. She mentions that the feature is coming to insiders soon and will be rolled out to the production ring by the end of 2019.

But I was curious as to which version of the OneDrive sync client supports the feature so I tested some things out. Fist I checked which version of the OneDrive sync client I have, I’m in the insiders ring and as of 11/11/2019 I’m on version 19.192.0926.0011.

OneNote Auto Import 2.png

To test I stopped the OneDrive sync client then using OneNote 2016 I created a new notebook called “OneNote to OneDrive Notebook Move”, as you see in the screenshot below the notebook is stored at C:\Users\Danie|\OneDrive\Documents\Testing\OneNote to OneDrive Notebook Move, note this is stored in a personal OneDrive account, not a OneDrive for Business account.

OneNote Auto Import 1.png

I started the OneDrive sync client again to see if the feature works… it didn’t. The .one and .onetoc2 files were copied up to OneDrive but the OneNote auto import experience did not occur.

OneDrive copied the files but my experience was not what was shown at Ignite.

OneDrive copied the files but my experience was not what was shown at Ignite.

Well that was lackluster, but then I thought what if I try it with a OneDrive for Business account (as opposed to a OneDrive personal account)? I shut down the OneDrive sync client again, then using OneNote 2016, I moved the notebook to a folder that I’m syncing to my OneDrive for business account, my new local path for the notebook is C:\Users\Danie\OneDrive - Dan Letsinger\Documents\OneNote Notebooks.

I also turned on dark mode for OneNote 2016 during my testing, neat!

I also turned on dark mode for OneNote 2016 during my testing, neat!

I started the OneDrive sync client and saw the magic happen immediately. The .one and .onetoc2 files were uploaded to OneDrive and the local files were removed.

Success!

Success!

To be sure, I opened OneNote 2016 and I see that the OneNote notebook is now syncing to my OneDrive for Business account.

OneNote Auto Import 6.png

Conclusion

It appears that if you have the OneDrive sync client 19.192.0926.0011 (or newer I’m assuming) and you’re syncing a OneDrive for Business account that OneNote auto import will migrate your OneNote notebooks without requiring you to take extra steps.

OneDrive for Business Next Gen Sync Client ConfigMgr Detection Method

Recently the OneDrive for Business Next Generation Sync Client was released. This new client brings the OneDrive sync feature out of the Office suite and into a standalone product. I'm not sure if it supported by Microsoft, but you can have both the Office integrated OneDrive for Business client and this new Next Gen client running at the same time. One of the key features missing from the Next Gen client is that you can't sync a SharePoint library using it. You can read all about the features and nuances of the client in Microsoft's post.

The installation files can be downloaded from this site http://go.microsoft.com/fwlink/p/?LinkId=248256.

Detecting the install

The installation for the new client is pretty straight forward so I'm not going to go into detail there, create a new Application, select a script type installer and run "OneDriveSetup.exe /silent" as your Installation Program. In my testing I was able to get the new client installed without any trouble (I tested on Windows 7 only, I'm not sure if my results are applicable to Windows 8, or Windows 10) using "OneDriveSetup.exe /silent" as my installation command line. You'll notice that this installation does not require administrator rights to run, nor does it show up in Add/Remove Programs. Instead the OneDrive application is installed to the user profile directory of which ever user ran the installation, it installs to %LOCALAPPDATA%\Microsoft\Onedrive\ , this also means that the installer will need to be run for each user who logs into the computer that wants to use this version of OneDrive. Given this information I thought I could use a file type detection method by using the path of %LOCALAPPDATA%\Microsoft\Onedrive\ and file name OneDrive.exe.

Seems simple enough, right? However this ends up with a failed install. Why? Because this detection rule runs in System context, regardless if you chose the "Install for User" or "Install for System" installation behavior. I was stuck on this for a while, after some searches I found that others have run into similar issues and discovered that if you run a script based detection method that it runs in the user's context if you choose install for user. I then configured a PowerShell script based detection method and used the command "Test-Path $env:LOCALAPPDATA\Microsoft\Onedrive\OneDrive.exe".

This cleared up the detection issue I was having and I was getting successfully installations when installing from the Application Catalog.

This by no means a comprehensive way to deploy the new OneDrive client, you might want to do some things like remove the old client, prompt your users to log into Office 365, or other things that would smooth the transition from the previous OneDrive client to the Next Gen client.