May 15, 2019 at 6:48 pm #156737ParticipantTopics: 5Replies: 5Points: 15Rank: Member
I have an issue where if a script function either as a module or a .ps1 will not load in Powershell 5 or above if the file is in One Drive. It will simply fail silently. I have this issue in 1803 and 1809. Has anyone else had this issue? Just curious.
May 15, 2019 at 7:00 pm #156740Senior ModeratorTopics: 8Replies: 1215Points: 4,334Rank: Community Hero
When you say the files are in onedrive, how are you importing it, can you show the code snippet you use to import it.
May 17, 2019 at 1:06 am #157037ParticipantTopics: 2Replies: 1013Points: 2,093Rank: Community Hero
You can only load and use modules, that are installed on your system, or when you physically provide the full path to where the module resides.
Seeing you OneDive in your file explorer, is not a normal path for this sort of thing. If you are trying to do that, then you need to add the path to your PS paths.
May 24, 2019 at 11:36 pm #158298ParticipantTopics: 5Replies: 5Points: 15Rank: Member
Both of the below concepts don’t work.
May 25, 2019 at 12:57 am #158300ParticipantTopics: 2Replies: 1013Points: 2,093Rank: Community Hero
Point of note. What you see in Windows Explorer is not the real path. It’s a translated thing.
If you want a real filesystem drive to OD, then you have to set that up. You do not say if this is ODP (personal) or ODB (business).
If it is the later, see this…
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).
Otherwise , this…
I really don’t understand your use case for this, but, I am sure you have your reasons. I have tons of scripts / modules in my ODP/ODB, but I would never run them from there. I download, and set them on the host as normal.
- The topic ‘Script Functions not loading from One Drive Folder’ is closed to new replies.