Share via


New-ADUser adding otherattributes error .

Question

Thursday, December 6, 2018 6:15 PM

Hello,

this is the error I'm getting: 

New-ADUser : Cannot Validate argument on parameter 'otherAttributes". The argument is null or an element of the argument collection contains a null value.

is there a way to get the new-aduser command to ignore the Nulls, not all of my users have a IPPhone for example.

I tried to use error action but it doesn't seem to work.



All replies (1)

Thursday, December 6, 2018 6:50 PM

Thanks Richard, I will use if statements and set-aduser.