Επεξεργασία

Κοινή χρήση μέσω


Get-AzureADContact

Gets a contact from Azure Active Directory.

Syntax

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

Description

The Get-AzureADContact cmdlet gets a contact from Azure Active Directory.

Examples

Example 1 Retrieve all contact objects in the directory

PS C:\> Get-AzureADContact

ObjectId                             Mail                DisplayName
--------                             ----                -----------
b052db07-e7ec-4c0e-b481-a5ba550b9ee7 contact@contoso.com Contoso Contact

This command retrieves all contact objects in the directory.

Example 2 Retrieve one contact using the filter parameter

PS C:\> Get-AzureADContact -All $true -Filter "mail -eq 'contact@contoso.com'"

ObjectId                             Mail                DisplayName
--------                             ----                -----------
b052db07-e7ec-4c0e-b481-a5ba550b9ee7 contact@contoso.com Contoso Contact

Parameters

-All

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

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Filter

Specifies an oData v3.0 filter statement. This parameter controls which objects are returned.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ObjectId

Specifies the ID of a contact in Azure Active Directory.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Top

Specifies the maximum number of records to return.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Notes

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