Import-Module Microsoft.Graph.PersonalContacts
$params = @{
homeAddress = @{
street = "123 Some street"
city = "Seattle"
state = "WA"
postalCode = "98121"
}
birthday = [System.DateTime]::Parse("1974-07-22")
}
# A UPN can also be used as -UserId.
Update-MgUserContact -UserId $userId -ContactId $contactId -BodyParameter $params
This example shows how to use the Update-MgUserContact Cmdlet.
The contact's birthday.
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BodyParameter
contact
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Identifies the version of the item.
Every time the item is changed, changeKey changes as well.
This allows Exchange to apply changes to the correct version of the object.
Read-only.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Children
The names of the contact's children.
Parameter properties
Type:
System.String[]
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CompanyName
The name of the contact's company.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ContactId
The unique identifier of contact
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateExpanded
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
Update
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CreatedDateTime
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Department
The contact's department.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisplayName
The contact's display name.
You can specify the display name in a create or update operation.
Note that later updates to other properties may cause an automatically generated value to overwrite the displayName value you have specified.
To preserve a pre-existing value, always include it as displayName in an update operation.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EmailAddresses
The contact's email addresses.
To construct, see NOTES section for EMAILADDRESSES properties and create a hash table.
The collection of open extensions defined for the contact.
Read-only.
Nullable.
To construct, see NOTES section for EXTENSIONS properties and create a hash table.
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Manager
The name of the contact's manager.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MiddleName
The contact's middle name.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MobilePhone
The contact's mobile phone number.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MultiValueExtendedProperties
The collection of multi-value extended properties defined for the contact.
Read-only.
Nullable.
To construct, see NOTES section for MULTIVALUEEXTENDEDPROPERTIES properties and create a hash table.
Credentials for a proxy server to use for the remote call
Parameter properties
Type:
System.Management.Automation.PSCredential
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ProxyUseDefaultCredentials
Use the default credentials for the proxy
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ResponseHeadersVariable
Optional Response Headers Variable.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Aliases:
RHV
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SingleValueExtendedProperties
The collection of single-value extended properties defined for the contact.
Read-only.
Nullable.
To construct, see NOTES section for SINGLEVALUEEXTENDEDPROPERTIES properties and create a hash table.
Runs the command in a mode that only reports what would happen without performing the actions.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-YomiCompanyName
The phonetic Japanese company name of the contact.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-YomiGivenName
The phonetic Japanese given name (first name) of the contact.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-YomiSurname
The phonetic Japanese surname (last name) of the contact.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
UpdateViaIdentityExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
UpdateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
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.
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.
BODYPARAMETER <IMicrosoftGraphContact>: contact
[(Any) <Object>]: This indicates any property can be added to this object.
[Categories <String[]>]: The categories associated with the item
[ChangeKey <String>]: Identifies the version of the item.
Every time the item is changed, changeKey changes as well.
This allows Exchange to apply changes to the correct version of the object.
Read-only.
[CreatedDateTime <DateTime?>]: The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
[LastModifiedDateTime <DateTime?>]: The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
[Id <String>]: The unique identifier for an entity.
Read-only.
[AssistantName <String>]: The name of the contact's assistant.
[Birthday <DateTime?>]: The contact's birthday.
The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time.
For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
[BusinessAddress <IMicrosoftGraphPhysicalAddress>]: physicalAddress
[(Any) <Object>]: This indicates any property can be added to this object.
[City <String>]: The city.
[CountryOrRegion <String>]: The country or region.
It's a free-format string value, for example, 'United States'.
[PostalCode <String>]: The postal code.
[State <String>]: The state.
[Street <String>]: The street.
[BusinessHomePage <String>]: The business home page of the contact.
[BusinessPhones <String[]>]: The contact's business phone numbers.
[Children <String[]>]: The names of the contact's children.
[CompanyName <String>]: The name of the contact's company.
[Department <String>]: The contact's department.
[DisplayName <String>]: The contact's display name.
You can specify the display name in a create or update operation.
Note that later updates to other properties may cause an automatically generated value to overwrite the displayName value you have specified.
To preserve a pre-existing value, always include it as displayName in an update operation.
[EmailAddresses <IMicrosoftGraphEmailAddress[]>]: The contact's email addresses.
[Address <String>]: The email address of the person or entity.
[Name <String>]: The display name of the person or entity.
[Extensions <IMicrosoftGraphExtension[]>]: The collection of open extensions defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
[FileAs <String>]: The name the contact is filed under.
[Generation <String>]: The contact's suffix.
[GivenName <String>]: The contact's given name.
[HomeAddress <IMicrosoftGraphPhysicalAddress>]: physicalAddress
[HomePhones <String[]>]: The contact's home phone numbers.
[ImAddresses <String[]>]: The contact's instant messaging (IM) addresses.
[Initials <String>]: The contact's initials.
[JobTitle <String>]: The contact’s job title.
[Manager <String>]: The name of the contact's manager.
[MiddleName <String>]: The contact's middle name.
[MobilePhone <String>]: The contact's mobile phone number.
[MultiValueExtendedProperties <IMicrosoftGraphMultiValueLegacyExtendedProperty[]>]: The collection of multi-value extended properties defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Value <String[]>]: A collection of property values.
[NickName <String>]: The contact's nickname.
[OfficeLocation <String>]: The location of the contact's office.
[OtherAddress <IMicrosoftGraphPhysicalAddress>]: physicalAddress
[ParentFolderId <String>]: The ID of the contact's parent folder.
[PersonalNotes <String>]: The user's notes about the contact.
[Photo <IMicrosoftGraphProfilePhoto>]: profilePhoto
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Height <Int32?>]: The height of the photo.
Read-only.
[Width <Int32?>]: The width of the photo.
Read-only.
[Profession <String>]: The contact's profession.
[SingleValueExtendedProperties <IMicrosoftGraphSingleValueLegacyExtendedProperty[]>]: The collection of single-value extended properties defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Value <String>]: A property value.
[SpouseName <String>]: The name of the contact's spouse/partner.
[Surname <String>]: The contact's surname.
[Title <String>]: The contact's title.
[YomiCompanyName <String>]: The phonetic Japanese company name of the contact.
[YomiGivenName <String>]: The phonetic Japanese given name (first name) of the contact.
[YomiSurname <String>]: The phonetic Japanese surname (last name) of the contact.
BUSINESSADDRESS <IMicrosoftGraphPhysicalAddress>: physicalAddress
[(Any) <Object>]: This indicates any property can be added to this object.
[City <String>]: The city.
[CountryOrRegion <String>]: The country or region.
It's a free-format string value, for example, 'United States'.
[PostalCode <String>]: The postal code.
[State <String>]: The state.
[Street <String>]: The street.
EMAILADDRESSES <IMicrosoftGraphEmailAddress[]>: The contact's email addresses.
[Address <String>]: The email address of the person or entity.
[Name <String>]: The display name of the person or entity.
EXTENSIONS <IMicrosoftGraphExtension[]>: The collection of open extensions defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
HOMEADDRESS <IMicrosoftGraphPhysicalAddress>: physicalAddress
[(Any) <Object>]: This indicates any property can be added to this object.
[City <String>]: The city.
[CountryOrRegion <String>]: The country or region.
It's a free-format string value, for example, 'United States'.
[PostalCode <String>]: The postal code.
[State <String>]: The state.
[Street <String>]: The street.
INPUTOBJECT <IPersonalContactsIdentity>: Identity Parameter
[ContactFolderId <String>]: The unique identifier of contactFolder
[ContactFolderId1 <String>]: The unique identifier of contactFolder
[ContactId <String>]: The unique identifier of contact
[ExtensionId <String>]: The unique identifier of extension
[UserId <String>]: The unique identifier of user
MULTIVALUEEXTENDEDPROPERTIES <IMicrosoftGraphMultiValueLegacyExtendedProperty[]>: The collection of multi-value extended properties defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Value <String[]>]: A collection of property values.
OTHERADDRESS <IMicrosoftGraphPhysicalAddress>: physicalAddress
[(Any) <Object>]: This indicates any property can be added to this object.
[City <String>]: The city.
[CountryOrRegion <String>]: The country or region.
It's a free-format string value, for example, 'United States'.
[PostalCode <String>]: The postal code.
[State <String>]: The state.
[Street <String>]: The street.
PHOTO <IMicrosoftGraphProfilePhoto>: profilePhoto
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Height <Int32?>]: The height of the photo.
Read-only.
[Width <Int32?>]: The width of the photo.
Read-only.
SINGLEVALUEEXTENDEDPROPERTIES <IMicrosoftGraphSingleValueLegacyExtendedProperty[]>: The collection of single-value extended properties defined for the contact.
Read-only.
Nullable.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Value <String>]: A property value.