First make sure that you install the different prerequisites as outlined in Connect to Office 365 PowerShell – next open Windows Azure Active Directory Module for Windows PowerShell. To connect to Office 365, simply type connect-msolservice . Get-MsolRole will give you a list of all administrator roles. You will see that the internal role name which is listed is still "CRM Service Administrator". The last line will export all users with this role to a CSV file
connect-msolservice
get-msolrole | select name, description
$role = get-msolrole -rolename "CRM Service Administrator"
get-msolrolemember -roleobjectid $role.objectid | export-csv d:\temp\serviceadmins.csv
No comments:
Post a Comment