Делите путем


Get-MsolAdministrativeUnit

Note



  • The cmdlets were previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets.

The Get-MsolAdministrativeUnit cmdlet is used to retrieve administrative units from .

Syntax

Get-MsolAdministrativeUnit [-UserObjectId <Guid>] [-UserPrincipalName <String>] [-SearchString <String>] [-MaxResults <Int>] [-TenantId <Guid>] [<CommonParameters>]

Get-MsolAdministrativeUnit -ObjectId <Guid> [-TenantId <Guid>] [<CommonParameters>]

Get-MsolAdministrativeUnit [-UserObjectId <Guid>] [-UserPrincipalName <String>] [-SearchString <String>] -All [-TenantId <Guid>] [<CommonParameters>]

Parameters

-UserObjectId <Guid>
        The unique ID of a user. If provided, only administrative units that this user belongs to will be returned.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-UserPrincipalName <string>
        The user principal name of a user. If provided, only administrative units that this user belongs to will be returned. 
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-ObjectId <Guid>
        The unique ID of the administrative unit to retrieve.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false

-SearchString <string>
        The string to search on. Only administrative units with a display name or email address starting with this string will be returned.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

-MaxResults <int>
        The maximum number of results returned for a search.
        
        Required?                    false
        Position?                    named
        Default value                250
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -TenantId <Guid>
        The unique ID of the tenant to perform the operation on. If this is 
        not provided, then the value will default to the tenant of the             
        current user. This parameter is only applicable to partner users.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false

<CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, type,
        "get-help about_commonparameters".

    -All 
        If present then all results will be returned.  Cannot be used with 
        MaxResults parameter.
        
        Required?                    false
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false

Examples

The following command retrieves the administrative unit called “West Coast”.

Get-MsolAdministrativeUnit –SearchString “West Coast”

Additional Resources

There are several other places you can get more information and help. These include:

See Also

Other Resources

Using Administrative Units - Public Preview
Manage Azure Active Directory by using Windows PowerShell