Remove-EntraContact
Removes a contact.
Syntax
Default (Default)
Remove-EntraContact
-OrgContactId <String>
[<CommonParameters>]
Description
The Remove-EntraContact
removes a contact from Microsoft Entra ID.
Examples
Example 1: Remove a contact
Connect-Entra -Scopes 'OrgContact.Read.All'
$contact = Get-EntraContact -Filter "displayName eq 'Contoso Contact'"
Remove-EntraContact -OrgContactId $contact.Id
The example shows how to remove a contact.
Example 2: Remove a contact through pipelining
Connect-Entra -Scopes 'OrgContact.Read.All'
Get-EntraContact -Filter "displayName eq 'Contoso Contact'" | Remove-EntraContact
The example shows how to remove a contact.
Parameters
-OrgContactId
Specifies the object ID of a contact in Microsoft Entra ID.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ObjectId |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
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.