Add deployments/services/Microsoft 365/Seize Control of Personal OneDrive Data.md
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 6s
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 6s
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
## Purpose
|
||||||
|
You may find that you need to access data from a user's personal OneDrive account, and since that data cannot be accessed directly via Office365's Admin Portal, you have to do some legwork in Powershell.
|
||||||
|
|
||||||
|
### Connect to Sharepoint
|
||||||
|
```powershell
|
||||||
|
Install-Module Microsoft.Online.SharePoint.PowerShell
|
||||||
|
Import-Module Microsoft.Online.SharePoint.PowerShell
|
||||||
|
Connect-SPOService -Url https://<companyname>-admin.sharepoint.com # Login with your Office365 Admin Credentials when Prompted
|
||||||
|
```
|
||||||
|
|
||||||
|
### Display List of Personal Sharepoint Sites (OneDrive)
|
||||||
|
```powershell
|
||||||
|
Get-SPOSite -IncludePersonalSite $true -Limit All
|
||||||
|
```
|
||||||
|
|
||||||
|
### Check OneDrive Usage of the Given User
|
||||||
|
```powershell
|
||||||
|
Get-SPOSite -Identity "https://<companyname>-my.sharepoint.com/personal/username_companyname_com" | Select Url, Owner, StorageUsageCurrent, StorageQuota, LastContentModifiedDate
|
||||||
|
```
|
||||||
|
|
||||||
|
### Assign Yourself Permissions to Their OneDrive
|
||||||
|
```powershell
|
||||||
|
Set-SPOUser `
|
||||||
|
-Site "https://eaglesafetyak-my.sharepoint.com/personal/username_companyname_com" `
|
||||||
|
-LoginName "i:0#.f|membership|admin@companyname.com" `
|
||||||
|
-IsSiteCollectionAdmin $true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Navigate to Webpage
|
||||||
|
At this point, you now have permissions to access the OneDrive data, so open a web browser and navigate to the SPOSite URL seen previously, seen below. From here, you can download, upload, and manage the data however you need.
|
||||||
|
- `https://<companyname>-my.sharepoint.com/personal/username_companyname_com`
|
||||||
Reference in New Issue
Block a user