Closed masterpipo closed 5 years ago
Hmm that should have worked. I guess you can try to explicitly make it an array of strings and see if that works?
New-TridionUser -Name 'GLOBAL\user01' -MemberOf @('SuperUsers','WebMasters')
Thanks @pkjaer looks like that did the trick
Any plans to change the execution of this in the future? Just in case if I need to change my script as well :)
Possibly, though I'm not sure to what exactly. It seems like your issue was that it didn't automatically convert the two strings into an array -- but that's fairly understandable as there were no quotes and the parameter is a string array. So you could have meant it as a single string that just happens to have a comma in it.
In general, it's a good idea to be explicit (array, quoted strings), so I think perhaps it's more appropriate to just update the example. But I'm certainly open to ideas :)
Ah I think it was just a miss on the get-help notes. Shouldn't be a big deal. Happy to close this as is :)
I am scripting adding new users to Tridion, but I keep encountering this weird issue when adding a new user to multiple groups
This part works when adding to a single group.
I am using the following example below from get-help
Is there anything I am not using correctly?