Office 365:如何批量初始化OneDrive for Business?

很多公司在使用Office 365之后,根据企业内部的业务需求,需要将Office 365 订阅下的部分用户(Mailbox+OneDrive for Business+ SharePoint Site Collection)迁移到新订阅中进行管理,那么在Tenant to Tenant迁移时,管理员在新订阅中添加或者同步用户并授权之后,针对OneDrive for Business需要做的是如何批量初始化OneDrive for Business,而不是手动一个个登录账户再通过单击“OneDrive for Business”来完成初始化过程,具体分两个过程:

  • 使用PowerShell命令批量初始化OneDrive for Business
  • 使用PowerShell命令验证初始化OneDrive for Business 成功

使用PowerShell命令批量初始化OneDrive for Business

本文将为大家介绍如何使用Powershell的方式完成批量初始化OneDrive for Business的操作步骤,具体操作步骤如下所示:

  1. 安装Windows Azure Active Directory Module for Windows PowerShell,获取Office 365 全局管理员的登录身份:

    Import-Module MSOnline
    $msolCred = Get-Credential

    Office 365:如何批量初始化OneDrive for Business?

2.使用获取到的用户身份链接SharePoint Online Service:
Connect-MsolService -credential $msolCred
Connect-SPOService -url https://mvptraining-admin.sharepoint.com -Credential $msolCred

Office 365:如何批量初始化OneDrive for Business?
3.输入要请求OneDrive for business初始化的UPN地址:
$emails = "[email protected]","[email protected]"
Office 365:如何批量初始化OneDrive for Business?

4.请求批量生成Personal Site的命令:

request-SPOPersonalSite -UserEmails $emails -nowait

Office 365:如何批量初始化OneDrive for Business?

说明:

1.Request-SPOPersonalSite cmdlet请求将指定的用户加入队列,以便为每个用户创建一个个人站点,实际的个人站点稍后由Timer job来创建,批量初始化OneDrive将在24小时内生效。。
2.该命令一次最多可以指定200个用户批量初始化OneDrive for Business
3.执行此cmdlet的用户必须至少分配SharePoint Online Administrator角色,并已分配SharePoint Online License,以便能够为用户提供OneDrive。

使用PowerShell命令验证初始化OneDrive for Business 成功

1.Get-SPOSite -Template "SPSPERS" -limit ALL -includepersonalsite $True | Select URL, Owner | Format-table -autosize | Out-string -width 8096 | Out-file C:\OneDriveSites.txt

Office 365:如何批量初始化OneDrive for Business?

2.批量初始化的OneDrive已生成,Report如下所示:

Office 365:如何批量初始化OneDrive for Business?

谢谢阅读~

猜你喜欢

转载自blog.51cto.com/13637423/2385121