Office 365:如何批量初始化OneDrive for Business?
- 使用PowerShell命令批量初始化OneDrive for Business
- 使用PowerShell命令驗證初始化OneDrive for Business 成功
使用PowerShell命令批量初始化OneDrive for Business
本文將為大家介紹如何使用Powershell的方式完成批量初始化OneDrive for Business的操作步驟,具體操作步驟如下所示:
-
安裝Windows Azure Active Directory Module for Windows PowerShell,獲取Office 365 全局管理員的登錄身份:
Import-Module MSOnline
$msolCred = Get-Credential
2.使用獲取到的用戶身份鏈接SharePoint Online Service:
Connect-SPOService -url https://mvptraining-admin.sharepoint.com -Credential $msolCred
3.輸入要請求OneDrive for business初始化的UPN地址:
$emails = "[email protected]","[email protected]"
4.請求批量生成Personal Site的命令:
request-SPOPersonalSite -UserEmails $emails -nowait
說明:
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
2.批量初始化的OneDrive已生成,Report如下所示:
謝謝閱讀~
Office 365:如何批量初始化OneDrive for Business?