Get-AzureADContactMembership
Get a contact membership.
Syntax
Default (Default)
Get-AzureADContactMembership
-ObjectId <String>
[-All <Boolean>]
[-Top <Int32>]
[<CommonParameters>]
Description
The Get-AzureADContactMembership cmdlet gets a contact membership in Azure Active Directory.
Examples
Example 1: Get the memberships of a contact
PS C:\> $Contact = Get-AzureADContact -Top 1
PS C:\> Get-AzureADContactMembership -ObjectId $Contact.ObjectId
ObjectId ObjectType
-------- ----------
0015df25-808e-4715-9c24-a6929c25c201 Group
The first command gets a contact by using the Get-AzureADContact (./Get-AzureADContact.md)cmdlet, and then stores it in the $Contact variable.
The second command gets the memberships for $Contact.
Parameters
-All
If true, return all memberships. 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 |
-ObjectId
Specifies the ID of a contact in Azure Active Directory.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Top
Specifies the maximum number of records to return.
Parameter properties
Type: | Int32 |
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 |
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.
Notes
See the migration guide for Get-AzureADContactMembership to the Microsoft Graph PowerShell.