onedrive
10 TopicsAutomate Powershell Force OneDrive to Re Sync if there is a Sync Error noted
we use an RMM to automate powershell scripts to workdevices to monitor them. We get a lot of "OneDrive for Business, error with syncing" alerts. What I always see is that if OneDrive is restarted (manually) the sync is done again and the error is solved. Do people have a powershell script to "re sync", a script that we can initialize when an alert like this is coming up. So we don't have to manually restart or reïnstall onedrive to solve it99Views0likes1CommentGraph Module on Onedrive Folder not synced
Hello team, I´m trying to run Graph on Powershell but it keeps getting the module from a onedrive folder that isn't synced and can't sync it right now. How can i change the path where powershell/graph is getting the modules? ------------------- Import-Module : Could not load file or assembly 'file:///C:\Users\catarina.machado\OneDrive - Claranet Limited\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users\1.11.0\bin\Microsoft.Graph.Users.private.dll' or one of its dependencies. The cloud file provider is not running. (Exception from HRESULT: 0x8007016A) At line:1 char:1 + Import-Module Microsoft.Graph.Users + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand The correct path is: file:///C:\Users\catarina.machado\OneDrive - Claranet\Documents\WindowsPowerShell\Modules\Microsoft.Graph.Users\1.11.0\bin\Microsoft.Graph.Users.private.dll Thank you.576Views0likes3CommentsMicrosoft Graph PowerShell SDK Module OneDrive Folder Permissions Assignment
As an M365 Global Admin, I have been tasked with creating a new folder in other users OneDrive root folder (Documents) we can call that folder 'myFolder', then I need to assign a Microsoft Azure Security group ('myGroup') to that folder with read/write permissions. I have a list of users (taking input from txt file of UPNs), and am able to loop through the users and create the folder, so step one is possible, but where I am failing is the assignment of the permissions, am using PowerShell 7 and the MS Graph PowerShell Mod, actually for the folder creation I used the API and invoke-method, but I am running into problems since OneDrive is on top of SharePoint, I am not sure how to accomplish this task. Any help would be greatly appreciated! Original Post: https://techcommunity.microsoft.com/t5/microsoft-365/microsoft-graph-powershell-sdk-module-onedrive-folder/m-p/3940795495Views0likes0CommentsIs there a way to reset/wipe all data from M365 user accounts in order to re-use the same accounts?
Dear all, I apologize in advance if I am posting my question in the wrong place. Every year we have external people coming to our campus who need to access specific school resources just for a few months. We have created several accounts for them with policy restrictions and we are happy with this solution. We were wondering if there is a way to automate the deletion of all their data (mainly OneDrive files/Outlook emails) at the end of their stay here in order to keep those accounts clean for the upcoming persons. We don't want to do this task manually. Is it quicker to delete the accounts and re-create them every year? Many thanks in advance for any help FrancescoSolved5.6KViews0likes9CommentsFind all users with content in "Shared with everyone" folder inside OneDrive
I am really hoping that someone has come across a method using PowerShell to find all users that have content in a folder called "Shared with everyone" within their OneDrive library. Need to locate any libraries with content in this library so I can send some urgent comms to the affected users only.1.8KViews0likes1CommentODfB Get-SPOUser - Get all ODFB Secondary Owers
We have an issue and need to get a list of all secondary owners for all OneDrive URLs. I've been playing around with get-spouser -site https://domain-my.sharepoint.com/personal/User_domain_com | Where-Object {$_.IsSiteADmin -eq ‘True’} | FL Which returns the people but not sure how to get on all accounts and return URLs & Admins. Any help would be great!!1.9KViews0likes2CommentsQuery User Specific Registry Keys and Export to CSV
I have a task to query the OneDrive HKCU registry key(HKCU:\Software\Microsoft\OneDrive\Accounts) and export those key properties and its values to some network location for evaluation So I wrote a general PS script like below to do the job. And this needs to be executed only when user is logged in and in SCCM UserContext Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Business1 -Name userfolder,username,useremail | Export-Csv \abcd\efgh\ijkl\OneDrive.Csv -NoTypeInformation -Append -Force Get-ItemProperty -Path HKCU:\Software\Microsoft\OneDrive\Accounts\Personal -Name userfolder,username,useremail | Export-Csv \abcd\efgh\ijkl\OneDrive.Csv -NoTypeInformation -Append -Force if any users does not have those keys or properties, how to stop them from seeing some error message in PowerShell window?7.4KViews0likes1CommentWindows 10 deboat
https://github.com/EntityTech/Windows-10-Debloat I've just been playing around with Powershell seeing what I can teach myself but right now this is a little project I've started to try to see if I can completely debloat windows 10 using powershell If you have any ideas feel free to let me know what else would make this better.1.3KViews0likes1CommentCan I unshare files in OneDrive with Powershell
I am looking through the cmdlets available in PnP-PowerShell and nothing is jumping out at me. What I want to do is loop through a given user's OneDrive - which I think I'm okay with - and then UNSHARE anything that's been shared. Or just set everything to Private if that's easier. Is this possible? With PnP, or maybe a POST to Graph, or any other way? Thanks.6KViews0likes4CommentsMove new arrived files from one folder to an other
Hi I need a poweshell script that move all new arrived pdf files from one folder to an other folder. - New pdf files detaches from email to d:\daownload folder - A scheduled job looks twice a day in d:\download folder and move all arrived pdf files to d:\PDF files\ Thanks a lots for any help /SoranSolved3.4KViews0likes2Comments