To modify a single-valued property, use a pair of -Property and -Value parameters:
Set-CGraph users -Id andy@cayosoft.com -Property city -Value "New York"
Tip: List of property names can be found in the Microsoft Graph documentation for the corresponding resource type. For example, Properties section in the User article for the list of user properties.
To modify a multi-valued property, specify -Value as an array:
Set-CGraph users -Id andy@cayosoft.com -Property businessPhones -Value @('4251200000')
To modify multiple properties at once, use -Properties parameter and pass a hashtable of property name / property value pairs:
$properties = @{city = "New York"; streetAddress = "Main st, 101"}
Set-CGraph users -Id andy@cayosoft.com -Properties $properties
Comments
0 comments
Please sign in to leave a comment.