本文主要是介绍Office 365 IT Professional——利用PowerShell管理Administrator Role,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
相信好多开发朋友都习惯于用PowerShell去管理Office 365 Administrator Role,那么需要注意,Office 365 Central Admin 中的Administrator Role在PowerShell里的命名不同,如下表格所示:
Admin Center Role Name | Windows PowerShell Equivalent Role Name |
Global administrator | Company Administrator |
Billing administrator | Billing Administrator |
Password administrator | Helpdesk Administrator |
Service administrator | Service Support Administrator |
User management administrator | User Account Administrator |
注意:我们说利用PowerShell管理Administrator Role,是针对Existing Tenant Account而言,也就是说针对已经存在的Office365用户或者拥有某个Administrator Role的用户切换其他的Role时,可以用PowerShell来实现,并非是利用PowerShell来创建新的Office 365的Account同时又赋予AdministratorRole。
具体命令如下所示:
Add-MsolRoleMember–RoleName“Helpdesk Administrator”–RoleMemberEmailAddressmelissaf@lucernepublishing.onmicrosoft.com
举例:我们需将ShelleyLiu0415@AvePointCC.OnMicrosoft.com赋予Password Role的管理权限,具体步骤为:
- 安装SharePoint Online Management Shell
- Microsoft .NET Framework 3.5
- Windows版本:Windows 8.1, Windows 8, Windows 7, Windows Server 2012 R2, Windows Server 2012
- 安装Microsoft Online Services Sign-In Assistant for IT Professionals RTW
- 安装Azure Active Directory Module for Windows PowerShell (64-bit version)
- 连接SharePoint Online Service
- 用Administrator打开Azure Active Directory Module for Windows PowerShell这个工具
- 输入命令,如下所示:
import-modulemsonline
$cred=get-credential
- 弹出验证Credential页面,输入Office 365 Administrator信息,登录,如下图所示:
- 连接Office 365,输入命令:Connect-msolservice –credential $cred,如下图所示:
- 输入命令,赋予Password Administrator Role权限
- 输入命令Add-MsolRoleMember–RoleName “Helpdesk Administrator” –RoleMemberEmailAddress “ShelleyLiu0415@AvePointCC.OnMicrosoft.com”,如下图所示:
- 登录Office 365 Admin Center->Users->Active Users,选择Shelleyliu0415@AvePointCC.OnMicrosoft.com账户,查看其Administrator Role,如下图所示:
这篇关于Office 365 IT Professional——利用PowerShell管理Administrator Role的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!