Get-MsolAdministrativeUnitMember cmdlet in PowerShell gets members of administrative units from Microsoft Office 365.
The syntax to get members of an administrative unit is given below.
Get-MsolAdministrativeUnitMember [-AdministrativeUnitObjectId <Guid>] [-MaxResults <Int32>] [-All] [-TenantId <Guid>] [<CommonParameters>]
In this article, we will discuss how to use the Get-MsolAdministrativeUnitMember cmdlet in PowerShell to retrieve all members of an administrative unit.
How to Get Members of an Administrative Unit in Office 365
To get members of an administrative unit in Office 365, use the Get-MsolAdministrativeUnitMember command in PowerShell.
# Get the administrative unit from Azure Active Directory $AdministrativeUnit = Get-MsolAdministrativeUnit -SearchString "East Coast" # Get members of the administrative units Get-MsolAdministrativeUnitMember -AdministrativeUnitObjectId $AdministrativeUnit.ObjectId
The Get-MsolAdministrativeUnit cmdlet in PowerShell gets an administrative unit from the Azure Active Directory that matches the search string “East Coast” and stores the administrative unit in the
The Get-MsolAdministrativeUnitMember cmdlet in PowerShell returns all members of the administrative unit. This command uses the
-AdministrativeUnitObjectId parameter to specify the unique ID of the administrative unit.
I hope the above article on how to use the Get-MsolAdministrativeUnitMember cmdlet in PowerShell to get members of an administrative unit is helpful to you.
You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.