This topic contains 6 replies, has 3 voices, and was last updated by
January 7, 2019 at 6:36 pm #133271
Is there a way to run a script from a OneDrive folder?
I work both from the office and from home. Rather than remoting into my pc at the office or having duplicate folders with duplicate sets of scripts which I sometimes forget to update, it would be nice to be able to just have one folder with all my scripts and source files etc. on OneDrive.
I have been unsuccessful in finding a way to map a OneDrive folder to a drive letter however.
Any suggestions? Flash drives are out as they are encrypted with BitLocker and using them is a royal pain.
January 7, 2019 at 6:47 pm #133280ParticipantTopics: 2Replies: 29Points: 59Rank: Member
If you are using the OneDrive Sync Client, then you have a local folder to run your scripts from without the need to map it with a drive letter. I run scripts from my onedrive all the time without issue. OneDrive syncs my script folder across two machines I use for work.
January 7, 2019 at 7:01 pm #133287
I have had trouble running scripts when the path is several folders long. ie: c:\users\username\OneDrive – CompanyName, Inc.\foldername\foldername
I suspect it has to do with how the naming works for our OneDrive. Literally OneDrive – CompanyName, Inc.
So mapping the scripts folder to a drive letter would be ideal.
January 7, 2019 at 6:54 pm #133286ParticipantTopics: 2Replies: 876Points: 1,354Rank: Community Hero
Why the need to map a drive to OneDrive? OneDrive already syncs to your PC.
Just copy all your script folder to your OneDrive folder, it sync's as expected, and using the normal map drive or New-PSDrive, you should be able to map. So, I am curious as to what you've tried that you say has failed.
PSDrive notwithstanding, you've always been able to map a local drive to OneDrive, though doing so is a bit convoluted.
There have been lots of articles on how to do that since Win7 days.
Example of some:
January 7, 2019 at 7:03 pm #133292
This is a corporate OneDrive. Not a personal one.
January 7, 2019 at 7:15 pm #133293ParticipantTopics: 2Replies: 876Points: 1,354Rank: Community Hero
You can still map a drive to ODfB
OneDriveMapper automatically map your OneDrive for Business upon login
This script maps your Onedrive / Sharepoint / Teams document libraries to driveletters (or shortcuts). It can be used in any environment (VDI, RemoteApp, w10 etc).
January 7, 2019 at 7:41 pm #133301
After reading these details:
"...Finally, mapping has severe limitations (speed, size limits, reliability), if you need a highly available solution, Freek Berson wrote a good article "I got your OneDrive for Business Sync right here!" on using a containerized solution with the actual, full Onedrive client and experience using FSLogix. ..."
I doubt I would use this and FLogix would have to be purchased which is not really a good fit.
Thanks for the info though.
The topic ‘Scripts and OneDrive’ is closed to new replies.