![]() ![]() Open Windows Explorer, and look at your OneDrive sync locations in the left pane. If you don’t know what that is, the easiest way to locate is to use a machine where OneDrive sync is already set up. Make sure you edit the path to your organization’s one drive in the script. Step one is to create the necessary directories if they don’t exist. Also, this post assumes you have a configuration profile applied to automatically set up OneDrive sync for your users. Technically, one drive isn’t “natively” syncing the directories, but this still accomplishes the goal, and I couldn’t find a better way to do this. The next Win32 app is dependent on the first, and does two things – It copies a robocopy script and VB script to the c:\temp directory, and also creates a scheduled task to perform regular two-way file copies between the two folders created by app 1. If they’re signing into a PC for the first time, it won’t be there, so we need the app to create it. This is important because by default, the uploads directory does not exist until a user saves a custom background. The first app creates the %appdata%\Microsoft\Teams\Backgrounds\Uploads and %userprofile%\OneDrive – orgname\TeamsBackgrounds directories for the user if they don’t exist. At a high level, we will deploy two Win32 apps targeted at a user group. A separate blog post was spawned with more details on how to deploy scheduled tasks with intune here. However, I learned some tricks about deploying scheduled tasks with Intune. ![]() After a bunch of testing, I found a solution that accomplishes my original goal, but does so in an old school way. I also work with many clients using Windows 10 Pro, so I wanted to stay clear of proactive remediations for those without the required licenses. I ended up having to get creative with a solution. After messing with this for a couple hours, I had no choice but to go back to the drawing board. However, I couldn’t get OneDrive to sync the files downstream to the %appdata%\Microsoft\Teams\Backgrounds\Uploads folder on PC2 since the directory already existed in OneDrive. Everything worked as expected and the backgrounds synced to OneDrive. The first time this deployed, it worked properly on PC1 and created a directory junction from the %appdata%\Microsoft\Teams\Backgrounds\Uploads folder to a directory I created named Teamsbackgrounds in OneDrive. The reason – you can’t set up a junction link if a directory already exists. I thought I had this working until it failed on the second PC I logged into. Originally, I using Microsoft’s instructions here to make a symbolic link – Can’t synchronize OneDrive files and folders from a local file location other than the default OneDrive path (). ![]() Step 2 for was to get this synced downstream on any other PC the users log into (so their backgrounds travel with them). So, the challenge was to sync the user’s %appdata%\Microsoft\Teams\Backgrounds\Uploads folder to OneDrive somewhere. Teams backgrounds are stored in the user’s %appdata% folder. I work with Teams a lot, so this was something I was interested in solving. This post was inspired by a question posted to the Modern Endpoint Management LinkedIn group about syncing/backing up users’ teams backgrounds to OneDrive.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |