Closed Chris4678 closed 5 years ago
Hey @Chris4678 - The InputObject parameter set is there to allow piping existing ExternalId objects into it (i.e. for copying from another user). You'll want to use the other parameter set to specify the Type and Value of the external ID, i.e.:
$test= Add-GSUserExternalId -Type login_id -Value 1234567890
Update-GSUser -User "email@domain.com" -ExternalIds $test
Well now the command runs without an error, however, I may still not be doing something correctly. What I want is for this ID to appear as the "EmployeeID" in Google. I dont see any direct command for updating employee ID and I thought this was it. Should I be using something else?
Hey I just figured it out. For anyone that finds this I had to change the -Type tag to "-Type Organization" Thanks for the help!
Nice!! Yeah, it's a bit odd with how it's worded but I'm glad you're sorted!!
I need to update existing users externalIds. I follow the Wiki and see that I first need to create an object using Add-GSUserExternalId and then pass that object to the Update-GSUser command. However, when I try to create the first ID object the command always gives me an error saying: Add-GSUserExternalId : Cannot process argument transformation on parameter 'InputObject'. Cannot convert the "xxxxxxxxxx" value of type "System.Int32" to type "Google.Apis.Admin.Directory.directory_v1.Data.UserExternalId[]".
My syntax looks like this: $test = Add-GSUserExternalId -InputObject xxxxxxxxxx -Verbose Update-GSUser -User "email@domain.com" -ExternalIds $test
Any idea what I might be doing wrong or is this a bug?