Retrieving an administrative unit's (AU) properties and relationships offers crucial insights into its structure and function. Microsoft Graph PowerShell helps you do this using the Get-MgDirectoryAdministrativeUnit cmdlet. By understanding AU connections, administrators can effectively delegate responsibilities and enforce security policies.
Before using the Get-MgDirectoryAdministrativeUnit cmdlet, ensure the following:
Install-Module Microsoft.Graph -Scope CurrentUser
AdministrativeUnit.Read.All
Run the following commands in Microsoft Graph PowerShell to retrieve an AU's relationship and its properties:
Get-MgDirectoryAdministrativeUnit
[-ExpandProperty <String[]>]
[-Property <String[]>]
[-Filter <String>]
[-Search <String>]
[-Skip <Int32>]
[-Sort <String[]>]
[-Top <Int32>]
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-PageSize <Int32>]
[-All]
[-CountVariable <String>]
[-ProgressAction <ActionPreference>]
[<CommonParameters>]
The following table contains some parameters that can be used along with the Get-MgDirectoryAdministrativeUnit cmdlet.
| Parameters | Description |
|---|---|
| -All | Lists all pages. |
| -CountVariable | Specifies a count of the total number of items in a collection. |
| -ExpandProperty | Expands the related entities. |
| -Filter | Filters items by property values. |
| -Headers | Provides optional headers that will be added to the request. |
Say goodbye to complicated PowerShell scripts with ADManager Plus, an identity governance and administration solution. ADManager Plus' comprehensive Microsoft Entra ID management and reporting simplifies complex admin tasks from a single, user-friendly console: