New-MgContact
Add new entity to contacts
Note
To view the beta release of this cmdlet, view New-MgBetaContact
Syntax
New-MgContact
[-ResponseHeadersVariable <String>]
[-AdditionalProperties <Hashtable>]
[-Addresses <IMicrosoftGraphPhysicalOfficeAddress[]>]
[-CompanyName <String>]
[-DeletedDateTime <DateTime>]
[-Department <String>]
[-DirectReports <IMicrosoftGraphDirectoryObject[]>]
[-DisplayName <String>]
[-GivenName <String>]
[-Id <String>]
[-JobTitle <String>]
[-Mail <String>]
[-MailNickname <String>]
[-Manager <IMicrosoftGraphDirectoryObject>]
[-MemberOf <IMicrosoftGraphDirectoryObject[]>]
[-OnPremisesLastSyncDateTime <DateTime>]
[-OnPremisesProvisioningErrors <IMicrosoftGraphOnPremisesProvisioningError[]>]
[-OnPremisesSyncEnabled]
[-Phones <IMicrosoftGraphPhone[]>]
[-ProxyAddresses <String[]>]
[-ServiceProvisioningErrors <IMicrosoftGraphServiceProvisioningError[]>]
[-Surname <String>]
[-TransitiveMemberOf <IMicrosoftGraphDirectoryObject[]>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-MgContact
-BodyParameter <IMicrosoftGraphOrgContact>
[-ResponseHeadersVariable <String>]
[-Headers <IDictionary>]
[-ProgressAction <ActionPreference>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Add new entity to contacts
Parameters
-AdditionalProperties
Additional Parameters
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Addresses
Postal addresses for this organizational contact. For now a contact can only have one physical address. To construct, see NOTES section for ADDRESSES properties and create a hash table.
Type: | IMicrosoftGraphPhysicalOfficeAddress[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BodyParameter
orgContact To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Type: | IMicrosoftGraphOrgContact |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CompanyName
Name of the company that this organizational contact belongs to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeletedDateTime
Date and time when this object was deleted. Always null when the object hasn't been deleted.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Department
The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DirectReports
The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. To construct, see NOTES section for DIRECTREPORTS properties and create a hash table.
Type: | IMicrosoftGraphDirectoryObject[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderby.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GivenName
First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Headers
Optional headers that will be added to the request.
Type: | IDictionary |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Id
The unique identifier for an entity. Read-only.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobTitle
Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The SMTP address for the contact, for example, 'jeff@contoso.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MailNickname
Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Manager
directoryObject To construct, see NOTES section for MANAGER properties and create a hash table.
Type: | IMicrosoftGraphDirectoryObject |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MemberOf
Groups that this contact is a member of. Read-only. Nullable. Supports $expand. To construct, see NOTES section for MEMBEROF properties and create a hash table.
Type: | IMicrosoftGraphDirectoryObject[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnPremisesLastSyncDateTime
Date and time when this organizational contact was last synchronized from on-premises AD. This date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in).
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnPremisesProvisioningErrors
List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0. To construct, see NOTES section for ONPREMISESPROVISIONINGERRORS properties and create a hash table.
Type: | IMicrosoftGraphOnPremisesProvisioningError[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnPremisesSyncEnabled
true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values).
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Phones
List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection. To construct, see NOTES section for PHONES properties and create a hash table.
Type: | IMicrosoftGraphPhone[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProgressAction
{{ Fill ProgressAction Description }}
Type: | ActionPreference |
Aliases: | proga |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProxyAddresses
For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0).
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResponseHeadersVariable
Optional Response Headers Variable.
Type: | String |
Aliases: | RHV |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceProvisioningErrors
Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance). To construct, see NOTES section for SERVICEPROVISIONINGERRORS properties and create a hash table.
Type: | IMicrosoftGraphServiceProvisioningError[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Surname
Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TransitiveMemberOf
Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. To construct, see NOTES section for TRANSITIVEMEMBEROF properties and create a hash table.
Type: | IMicrosoftGraphDirectoryObject[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrgContact
System.Collections.IDictionary
Outputs
Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrgContact
Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
ADDRESSES <IMicrosoftGraphPhysicalOfficeAddress- []
>: Postal addresses for this organizational contact.
For now a contact can only have one physical address.
[City <String>]
: The city.[CountryOrRegion <String>]
: The country or region. It's a free-format string value, for example, 'United States'.[OfficeLocation <String>]
: Office location such as building and office number for an organizational contact.[PostalCode <String>]
: The postal code.[State <String>]
: The state.[Street <String>]
: The street.
BODYPARAMETER <IMicrosoftGraphOrgContact>
: orgContact
[(Any) <Object>]
: This indicates any property can be added to this object.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.[Id <String>]
: The unique identifier for an entity. Read-only.[Addresses <IMicrosoftGraphPhysicalOfficeAddress-
[]>]
: Postal addresses for this organizational contact. For now a contact can only have one physical address.[City <String>]
: The city.[CountryOrRegion <String>]
: The country or region. It's a free-format string value, for example, 'United States'.[OfficeLocation <String>]
: Office location such as building and office number for an organizational contact.[PostalCode <String>]
: The postal code.[State <String>]
: The state.[Street <String>]
: The street.
[CompanyName <String>]
: Name of the company that this organizational contact belongs to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[Department <String>]
: The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[DirectReports <IMicrosoftGraphDirectoryObject-
[]>]
: The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand.[Id <String>]
: The unique identifier for an entity. Read-only.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.
[DisplayName <String>]
: Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderby.[GivenName <String>]
: First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[JobTitle <String>]
: Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[Mail <String>]
: The SMTP address for the contact, for example, 'jeff@contoso.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[MailNickname <String>]
: Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[Manager <IMicrosoftGraphDirectoryObject>]
: directoryObject[MemberOf <IMicrosoftGraphDirectoryObject-
[]>]
: Groups that this contact is a member of. Read-only. Nullable. Supports $expand.[OnPremisesLastSyncDateTime <DateTime?>]
: Date and time when this organizational contact was last synchronized from on-premises AD. This date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in).[OnPremisesProvisioningErrors <IMicrosoftGraphOnPremisesProvisioningError-
[]>]
: List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0.[Category <String>]
: Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property.[OccurredDateTime <DateTime?>]
: The date and time at which the error occurred.[PropertyCausingError <String>]
: Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress[Value <String>]
: Value of the property causing the error.
[OnPremisesSyncEnabled <Boolean?>]
: true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values).[Phones <IMicrosoftGraphPhone-
[]>]
: List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection.[Language <String>]
:[Number <String>]
: The phone number.[Region <String>]
:[Type <String>]
: phoneType
[ProxyAddresses <String-
[]>]
: For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0).[ServiceProvisioningErrors <IMicrosoftGraphServiceProvisioningError-
[]>]
: Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance).[CreatedDateTime <DateTime?>]
: The date and time at which the error occurred.[IsResolved <Boolean?>]
: Indicates whether the error has been attended to.[ServiceInstance <String>]
: Qualified service instance (for example, 'SharePoint/Dublin') that published the service error information.
[Surname <String>]
: Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values).[TransitiveMemberOf <IMicrosoftGraphDirectoryObject-
[]>]
: Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable.
DIRECTREPORTS <IMicrosoftGraphDirectoryObject- []
>: The contact's direct reports.
(The users and contacts that have their manager property set to this contact.) Read-only.
Nullable.
Supports $expand.
[Id <String>]
: The unique identifier for an entity. Read-only.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.
MANAGER <IMicrosoftGraphDirectoryObject>
: directoryObject
[(Any) <Object>]
: This indicates any property can be added to this object.[Id <String>]
: The unique identifier for an entity. Read-only.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.
MEMBEROF <IMicrosoftGraphDirectoryObject- []
>: Groups that this contact is a member of.
Read-only.
Nullable.
Supports $expand.
[Id <String>]
: The unique identifier for an entity. Read-only.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.
ONPREMISESPROVISIONINGERRORS <IMicrosoftGraphOnPremisesProvisioningError- []
>: List of any synchronization provisioning errors for this organizational contact.
Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0.
[Category <String>]
: Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property.[OccurredDateTime <DateTime?>]
: The date and time at which the error occurred.[PropertyCausingError <String>]
: Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress[Value <String>]
: Value of the property causing the error.
PHONES <IMicrosoftGraphPhone- []
>: List of phones for this organizational contact.
Phone types can be mobile, business, and businessFax.
Only one of each type can ever be present in the collection.
[Language <String>]
:[Number <String>]
: The phone number.[Region <String>]
:[Type <String>]
: phoneType
SERVICEPROVISIONINGERRORS <IMicrosoftGraphServiceProvisioningError- []
>: Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object .
Supports $filter (eq, not, for isResolved and serviceInstance).
[CreatedDateTime <DateTime?>]
: The date and time at which the error occurred.[IsResolved <Boolean?>]
: Indicates whether the error has been attended to.[ServiceInstance <String>]
: Qualified service instance (for example, 'SharePoint/Dublin') that published the service error information.
TRANSITIVEMEMBEROF <IMicrosoftGraphDirectoryObject- []
>: Groups that this contact is a member of, including groups that the contact is nested under.
Read-only.
Nullable.
[Id <String>]
: The unique identifier for an entity. Read-only.[DeletedDateTime <DateTime?>]
: Date and time when this object was deleted. Always null when the object hasn't been deleted.