Jump to content

Recommended Posts

Posted

Ok, so I have parachuted into an academy and had basically no handover with my predecessor, however, I have inherited a bunch of projects that its expected that I carry through, not a problem in itself. I have, however, come from a primarily GSuite background, and we are O365 here so I am on an extremely steep learning curve in terms of the stuff they want done.

 

I have the brief of effectively mapping the user area to the users OneDrive, not syncing, where the files exist in both places, but literally replacing the existing network area with OneDrive. I have been struggling to achieve this, I managed to get it so that OneDrive synced the MyDocs with OneDrive without any interaction with the user, but the files still existed on the network (the goal is for OneDrive to just be 'the place').

 

I think that the plan my predecessor had was not to use the OneDrive Sync tool, but rather, to map the drive - but in that case, I only found one article from MS saying that it wasn't recommended: https://docs.microsoft.com/en-us/sharepoint/support/administration/troubleshoot-mapped-network-drives

 

Googling just results in a myriad of different hacks and solutions and old MS docs that don't seem to do what I want anyway.

 

Ideally, I want this to be zero touch for the user, I don't want them to really know they are using OneDrive, I need to be able to do this via GPO / SCCM or something automated, but I'm kinda stuck.

 

Have any of you guys and gals done this? Did you use a tool? Did you use a third party company to help? Did you have any negative repercussions?

 

I'm super interested to hear what people did to achieve this and how it went?

 

Thanks

 

Charles

Posted

Don't use any third party hokey-cokey to map onedrive as if it's a network drive. It works, but not always, and you're playing cat-and-mouse with any MS changes

 

There has been a LOT of changes with onedrive so be wary of old blog articles

 

Assuming you are on a new version of windows 10, Files on Demand and known folder move is what you want. It silently moves peoples home areas to onedrive. If they are currently redirected then it's a bit more of a fiddle

Posted

Assuming you have SSO configured with office365 then what you need to do is prepare a csv file and use sharepoint migration tool

 

https://spmtreleasescus.blob.core.windows.net/install/default.htm

 

Export your students/staff home paths and line them up with onedrive location in your CSV, this should be pretty easy if your on premises usernames follow the same naming convention with office365

 

if you export home areas from AD using powershell into a csv

 

Get-ADUser -filter * -properties name, homedirectory | Export-Csv f:\mylist1.csv

 

using just the homedirectory tab, clean up the CSV so that it looks just like this (just column A at this point):

 

example csv:

A B C D E

\\FILEServer\home_staffdrive$\user3 https://domain-my.sharepoint.com/personal/user3_domain_co_uk Documents

\\FILEServer\home_staffdrive$\user2 https://domain-my.sharepoint.com/personal/user2_domain_co_uk Documents

\\FILEServer\home_staffdrive$\user1 https://domain-my.sharepoint.com/personal/user1_domain_co_uk Documents

 

The excel text to columns and "&" command with fill down should help

 

To get the path for column D i would make a copy of column A then use "text to columns" in excel for column A and separated using ""

 

This should give you a columns with user1 user2 user3 etc - cut and paste this into column G

 

Then for column D use the command :

 

="https://domain-my.sharepoint.com/personal/"&G&"_domain_co_uk"

 

Then replace whatever in bold with your unique domain office365 name, copy and paste values for D column to remove the formula and delete column G

 

Your CSV file is now ready for the migration tool

 

Start the migration in the background, it make take weeks, don't worry if its not up to date, before pulling the trigger you are going to do another sync to update anything which has been changed during the sync, you could if you want continue to run UNC home area along with a copy of everything in onedrive until you are ready to kill the home area drive and redirections to it - just make sure users are aware, this process will not lose anyones files they will always remain archived on the file server

 

from an updated workstation, import your onedrive GPO policies to your central GPO store

 

Here is a copy of our GPO

 

1d.JPG

 

2d.JPG

 

then when you are ready and users are offline change the GPO for folder redirection to local user profile

 

additionally in AD I also have set Home folder location to : "C:\Users\%USERNAME%\OneDrive - Our College"

  • Thanks 2
Posted

Thats awesome, really appreciate this - I think I will wait until monday to start playing about as it will give me a window to fix anything I break, but this looks good.

 

So have you gone for the approach of getting rid of the network folders in place of OneDrive or are you running the pair in tandem? How have you found it either way?

 

Much appreciated.

 

Charles

Posted

hey chaplic,

 

I certainly had no desire to use a third party - I just have noticed there are a lot of random tools to do things in 365, I thought perhaps this reflected a lack of a way to do them yourself - as I say, I'm not by any stretch fully up to speed on the 365 train.

 

What are we considering a new version of windows 10, its not as new as I would like, but I am focusing on building my windows 7 machines to 10 rather than sorting out a new 10 image at the moment (there is a LOT of updating and stuff to do), we are certainly not on the newest version. I was looking at the known folder move tool but it kept referencing syncing which put me off, but I'll give it more of a look!

 

Are you using this in your school?

 

Thanks

 

Charles

Posted
Thats awesome, really appreciate this - I think I will wait until monday to start playing about as it will give me a window to fix anything I break, but this looks good.

 

So have you gone for the approach of getting rid of the network folders in place of OneDrive or are you running the pair in tandem? How have you found it either way?

 

Much appreciated.

 

Charles

 

At the moment we just migrated home areas to onedrive - the process went pretty seamless i did it 3 weeks before we broke up for summer and had nothing but good feedback, only had to educate a few that your H drive home area is now the blue cloud icon, but since redirect for main folders works seamlessly no-one really knew the difference or saw any sort of downtime. After killing the GPO's for home areas i did one last sync with the migration tool, now i have archived the file server where the old home areas reside

 

One thing i forgot to mention, before you do the above you will have to give admin rights to the default admin tenant for O365 on everyone's onedrive account so that you (as admin) can upload files to their accounts, use the same login for the sharepoint tool as you do for the script below

 

Just change lines 22/23/25/26 to your o365 credentials

 

########
#ODFB Rights Administration
#Copyright:     Free to use, please leave this header intact
#Author:        Jos Lieben (OGD)
#Company:       OGD (http://www.ogd.nl)
#Script help:   http://www.lieben.nu
#Purpose:       Give an administrator rights on all Onedrive for Business accounts
########
#Requirements:
########
<#
Powershell 4
.NET 4.5
Sharepoint Online Management Shell (X64)
http://www.microsoft.com/en-us/download/details.aspx?id=35588
Sharepoint Server 2013 Client Components
http://www.microsoft.com/en-us/download/details.aspx?id=35585
run “Set-Executionpolicy Unrestricted” in an elevated powershell window
Windows 7+ or Windows Server 2008+
#>

$o365login     = "[email protected]"           #Username of O365 Admin
$o365pw        = "PASSWORD"                                        #Password of O365 Admin
$logfile       = ($env:APPDATA + "\ODFB_BP.log")	       #Logfile in case of errors
$spAdminURL    = "https://TENANT-admin.sharepoint.com"    #URL to your SP Admin site
$spMyURL       = "https://TENANT-my.sharepoint.com"       #URL to your SP MySites


#Start script
ac $logfile "-----$(Get-Date) ODFB_RA v0.1 $($env:COMPUTERNAME) Session log-----`n"

#build Credential Object
$secpasswd = ConvertTo-SecureString $o365pw -AsPlainText -Force
$Credentials = New-Object System.Management.Automation.PSCredential ($o365login, $secpasswd)

#Load sharepoint module
try{
   [system.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | Out-Null
   [system.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | Out-Null
   [system.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.UserProfiles") | Out-Null
}catch{
   $errorstring = "ERROR: Failed to load Sharepoint Libraries, exiting"
   ac $logfile $errorstring
   Write-Host $errorstring
   Pause
   Exit
}
#load SPOnline module
$env:PSModulePath += ";C:\Program Files\SharePoint Online Management Shell\"
try{
   Import-Module Microsoft.Online.SharePoint.PowerShell
}catch{
   $errorstring = "ERROR: Failed to load Sharepoint Online module, exiting"
   ac $logfile $errorstring
   ac $logfile $error[0]
   Write-Host $errorstring
   Pause
   Exit
}

#Build sP credential object
$creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($o365login,$secpasswd)

#build proxy
$proxyaddr = "$spAdminURL/_vti_bin/UserProfileService.asmx?wsdl"
$UserProfileService= New-WebServiceProxy -Uri $proxyaddr -UseDefaultCredential False
$UserProfileService.Credentials = $creds

$strAuthCookie = $creds.GetAuthenticationCookie($spAdminURL)
$uri = New-Object System.Uri($spAdminURL)
$container = New-Object System.Net.CookieContainer
$container.SetCookies($uri, $strAuthCookie)
$UserProfileService.CookieContainer = $container
try{
   $UserProfileResult = $UserProfileService.GetUserProfileByIndex(-1)
}catch{
   $errorstring = "Critical error, unable to get profiles"
   ac $logfile $errorstring
   ac $logfile $error[0]
   Write-Host $errorstring $error[0]
   Pause
   Exit
}
$NumProfiles = $UserProfileService.GetUserProfileCount()
$i = 1
$ProfileURLs = @()

Write-Host "Begin discovery of $NumProfiles profiles"
While ($UserProfileResult.NextValue -ne -1) 
{
   Write-Host "Checking profile $i of $NumProfiles"
   $Prop = $UserProfileResult.UserProfile | Where-Object { $_.Name -eq "PersonalSpace" } 
   $Url= $Prop.Values[0].Value
   if ($Url) {
       Write-Host "Adding $Url to the list"
       $ProfileURLs += $Url
   }
   $UserProfileResult = $UserProfileService.GetUserProfileByIndex($UserProfileResult.NextValue)
   $i++
}
Write-Host "Finished discovery of profiles"

Write-Host "Connecting to Sharepoint Online"
try{
   Connect-SPOService -Url $spAdminURL -Credential $Credentials
}catch{
   $errorstring = "Critical error, unable to Connect to Sharepoint Online"
   ac $logfile $errorstring
   ac $logfile $error[0]
   Write-Host $errorstring $error[0]
   Pause
   Exit
}

Write-Host "Start processing profiles"

foreach($profileURL in $ProfileURLs){
   $fullPath = "$spMyURL$profileURL".TrimEnd("/")
   Write-Host "Processing $fullPath"
   try{
       Set-SPOUser -Site $fullPath -LoginName $o365login -IsSiteCollectionAdmin $true
       Write-Host "$o365login permissions added to $fullPath"
   }catch{
       $errorstring = "Failed adding $o365login permissions to $fullPath"
       ac $logfile $errorstring
       ac $logfile $error[0]
       Write-Host $errorstring $error[0]      
   }
}

ac $logfile "Script finished"
Write-Host "Job Finished"
Pause
Exit

 

 

I'm now trying to get the other mapped network drives to file explorer, i've migrated them to sharepoint already again using "Teams" to create the online share and then sharepoint migration tool (took almost 2 weeks and 4TB) - just need to figure out how to get them showing in onedrive as i think the mapped network drive to sharepoint location is not the way forward

Posted

MS have provided GPOs for syncing Libraries, we use that here, its abit of hit miss here but its getting better with every update as it was in preview.

 

We deliberately haven’t synced everything as we want staff to get into the habit of using Teams as a single point of working.

 

Only places we have synced stuff is admin staff who don’t really roam from office to office.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...