Edit

Share via


Get-AzureADMSGroup

Gets information about groups in the Microsoft Entra ID (via MS Graph).

Syntax

GetQuery (Default)

Get-AzureADMSGroup
    [-All <Boolean>]
    [-Top <Int32>]
    [-Filter <String>]
    [<CommonParameters>]

GetVague

Get-AzureADMSGroup
    [-SearchString <String>]
    [-All <Boolean>]
    [<CommonParameters>]

GetById

Get-AzureADMSGroup
    -Id <String>
    [-All <Boolean>]
    [<CommonParameters>]

Description

The Get-AzureADMSGroup cmdlet gets information about groups in the Microsoft Entra ID using the Microsoft Graph. To get a group, specify the Id parameter. Specify the SearchString or Filter parameter to find particular groups. If you specify no parameters, this cmdlet gets all groups.

Examples

Example 1: Get all groups

PS C:\> Get-AzureADMSGroup

Id                            : d539a25e-2db2-482a-9dcb-2a0b27fe4f27
Description                   :
OnPremisesSyncEnabled         :
DisplayName                   :
ADSyncOperators
OnPremisesLastSyncDateTime    :
Mail                          :
MailEnabled                   : False
MailNickname                  : ADSyncOperators
OnPremisesSecurityIdentifier  : S-1-5-21-2695029449-1154706203-1063139792-1243
ProxyAddresses                : {}
SecurityEnabled               : True
GroupTypes                    : {}
MembershipRule                :
MembershipRuleProcessingState :


Id                            : d98ddc78-6e8d-4f0d-8a3f-b923c6ebc14b
Description                   :
OnPremisesSyncEnabled         :
DisplayName                   : Project Icarus
OnPremisesLastSyncDateTime    :
Mail                          :
MailEnabled                   : False
MailNickname                  : 60f3d02c-0c6e-41da-bb64-128c73b4d9e6
OnPremisesSecurityIdentifier  :
ProxyAddresses                : {}
SecurityEnabled               : True
GroupTypes                    : {DynamicMembership}
MembershipRule                : (user.jobtitle -eq "Sales manager") -or ((user.department -eq "Marketing") -and (user.country -eq "Greece"))
MembershipRuleProcessingState : On

This command gets all groups in the Microsoft Entra ID.

Example 2: Get a specific group by using an ID

PS C:\> Get-AzureADMSGroup -Id "d98ddc78-6e8d-4f0d-8a3f-b923c6ebc14b"

Id                            : d98ddc78-6e8d-4f0d-8a3f-b923c6ebc14b
Description                   :
OnPremisesSyncEnabled         :
DisplayName                   : Project Icarus
OnPremisesLastSyncDateTime    :
Mail                          :
MailEnabled                   : False
MailNickname                  : 60f3d02c-0c6e-41da-bb64-128c73b4d9e6
OnPremisesSecurityIdentifier  :
ProxyAddresses                : {}
SecurityEnabled               : True
GroupTypes                    : {DynamicMembership}
MembershipRule                : (user.jobtitle -eq "Sales manager") -or ((user.department -eq "Marketing") -and (user.country -eq "Greece"))
MembershipRuleProcessingState : On

This command gets information for the group that has the specified ID.

Parameters

-All

If true, return all groups. If false, return the number of objects specified by the Top parameter

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Filter

Specifies an oData v3.0 filter string to match a set of groups.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetQuery
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Id

Specifies the ID of the group that this cmdlet gets.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetById
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-SearchString

Specifies a search string. This cmdlet gets groups that have DisplayName or Description attributes that match the search string.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetVague
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Top

Specifies the maximum number of records that this cmldet gets. The default value is 100.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetQuery
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

Object

Notes

See the migration guide for Get-AzureADMSGroup to the Microsoft Graph PowerShell.

This cmdlet is currently in Public Preview. While a cmdlet is in Public Preview, we may make changes to the cmdlet which could have unexpected effects. We recommend that you do not use this cmdlet in a production environment.