May 14 2018
11:20 AM
- last edited on
Feb 06 2023
03:18 AM
by
TechCommunityAP
May 14 2018
11:20 AM
- last edited on
Feb 06 2023
03:18 AM
by
TechCommunityAP
Hi experts
one of my user has left the company and i can see his account disabled in active directory.
Now his boss asks me to copy all the users file from one drive and hand over to him. how do i achieve this.
May 14 2018 11:50 AM - edited May 14 2018 11:52 AM
Best way is to give access to the OneDrive location and let them download the stuff they need.
How to connect PowerShell to Office 365
You must download and install SharePoint Online Management Shell
https://www.microsoft.com/en-us/download/details.aspx?id=35588
Run Sharepoint Online Management Shell
Run as admin
How to grant admin access to OneDrive account
To add access to Site collection
Connect-SPOService -Url https://teanant-admin.sharepoint.com -credential username@domain.org
Set-SPOUser -Site https://tenant-my.sharepoint.com/personal/targerusername_domain_org -LoginName username@domain.org -IsSiteCollectionAdmin $true
May 14 2018 03:09 PM
May 14 2018 03:31 PM
May 14 2018 08:47 PM - edited May 14 2018 08:48 PM
Hi experts
I can see this user under deleted users.
Home-Users-Deleted users.
Is there any way to recover data of this user, i read earlier that contents will be preserved for one month
May 14 2018 08:52 PM
May 14 2018 09:09 PM
Connect-SPOService -Url https://teanant-admin.sharepoint.com -credential username@domain.org
is username@domain.org is deleted users account?
Set-SPOUser -Site https://tenant-my.sharepoint.com/personal/targerusername_domain_org -LoginName
username@domain.org -IsSiteCollectionAdmin $true
is username@domain.org is deleted users account?
May 14 2018 09:48 PM
May 15 2018 02:33 AM
Hi i would prefer my name to the 2nd part , i.e i will add my name to the site as a site collection admin.
After that how do i need to access the users files as i want to copy them and share to their manager
May 15 2018 05:47 AM
May 15 2018 06:13 AM - edited May 15 2018 06:15 AM
You can use PowerShell to achive this (for deleted SPO sites).
Set-sposite -Identity https://DOMAIN-my.sharepoint.com/personal/bas_wijdenes_domain_com -Owner "Roger.roger@baswijdenes.com
The owner will now be able to open the onedrive with the link already provided.
If you need more help, let me know.
May 20 2018 01:19 AM - edited May 20 2018 01:42 AM
i am getting the below error, i have installed sharepoing management shell, i am getting below error
PS C:\Windows\system32> Connect-SPOService -Url https://teanant-admin.sharepoint
.com -credential myuser@mydomain.com
Connect-SPOService : Could not connect to SharePoint Online.
At line:1 char:1
+ Connect-SPOService -Url https://teanant-admin.sharepoint.com -credential
myuser ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [Connect-SPOService], InvalidO
perationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Onlin
e.SharePoint.PowerShell.ConnectSPOService
even i tried both but i could not connect
Connect-SPOService -Url https://mydomain-my.sharepoint.com -credential myuser@mydomain.com
Connect-SPOService -Url https://mydomain-admin..sharepoint.com -credential myuser@mydomain.com
May 20 2018 03:42 AM - edited May 20 2018 03:44 AM
Hi i am able to connect to shell using my credentials myuser@mydomain.com
PS C:\Windows\system32> Connect-SPOService -Url https://mydomain-admin.sharepoint.com
lets say deleted user is rogerfederer his domain account is roger.federer in AD and email id was roger.federer@mydomain.com
next should i proceed with which syntax
Set-SPOUser -Site https://mydomain-my.sharepoint.com/personal/roger_federer_mydomain.com -loginName roger.federer@mydomain.com -IsSiteCollectionAdmin $true
or
Set-SPOUser -Site https://mydomain-my.sharepoint.com/personal/roger.federer_mydomain.com -loginName roger.federer@mydomain.com -IsSiteCollectionAdmin $true
once its done can i access his file by the rul
https://mydomain-my.sharepoint.com/personal/roger_federer_mydomain_com/_layouts/15/onedrive.aspx
May 20 2018 07:30 AM
May 20 2018 08:10 AM
thanks alot will try and update you
Set-SPOUser -Site https://mydomain-my.sharepoint.com/personal/roger.federer_mydomain.com -loginName myuser@mydomain.com -IsSiteCollectionAdmin $true