Closed Mschram72 closed 4 years ago
Hey @Mschram72 - Thanks for opening this up! I like the idea and am trying to think of how that could happen. I'm anticipating that it can be done by changing the Parents value on the Drive File to include the folder ID for your target Drive location.
Since it seems like you're able to get the file info when it's first shared using Get-GSDriveFileInfo
based on the description, my first test once I have time for this would be...
Add to My Drive
.$before = Get-GSDriveFileInfo $fileId
Add to My Drive
.$after = Get-GSDriveFileInfo $fileId
Once done, compare $before
with $after
and scope what's changed.
The above worked perfectly - I was able to grab the root ID of a user's drive, and then add that string the parent field on the desired share via Update-GSDriveFile -AddParents
You're an absolute legend, and thanks as always for the help!
Is your feature request related to a problem? Please describe. My user base needs drive files 'added to their drive' rather than shared, because they can't be bothered to click 'shared with me' and then browse through files.
Describe the solution you'd like A cmdlet or flag on the existing cmdlets that emulates the function of right clicking a shared directory (folder) in Drive, and clicking the 'Add to my Drive' button. This adds a shortcut to the user's Drive but the files permissions, ownership, etc remain unchanged - it is not a copy of the file, but simply a shortcut.
Describe alternatives you've considered Training. But ultimately if I could automate this process it would be ideal. The functionality may already exist in PSGSuite, but I would like some details on how to use it. I can currently access the target directory just fine via Get-GSDriveFile and can make copies, change permissions, etc. But what I need is the ability to perform an 'Add to My Drive' on the directory for a target list of users.
Additional context Add any other context or screenshots about the feature request here.