Forum Discussion

despaws's avatar
despaws
Copper Contributor
Nov 23, 2023

update-mguser syntax for parameters that require a <IMicrosoftGraphDirectoryObject[]>

Looking for the proper syntax to update user object properties with the "update-mguser" powershell command that require the <IMicrosoftGraphDirectoryObject[]> type input.  The get-help says "see notes", but as far as I can tell, the notes just repeat that statement again with no further clarification.

 

I know some properties such as "manager" that input this object have their own commend (Set-MgUserManagerByRef), but not all properties have their own command like this.  I'm specifically looking to update the "sponsors" property available in the "update-mgbetauser" command.  As mentioned above, the "get-help" says "To construct, see NOTES section for SPONSORS properties and create a hash table.".  But the Notes section just repeats this statement, with no clarification of what needs to be in the hash table or making it a IMicrosoftGraphDirectoryObject type.

 

Thanks for any help.

No RepliesBe the first to reply