New AD-User

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Trevor George Trevor George 1 year, 11 months ago.

  • Author
    Posts
  • #21226
    Profile photo of Trevor George
    Trevor George
    Participant

    I can set most attributes for a new AD user with the New-ADUser cmdlet including c which takes the -country parameter. However I have problems trying to set the co attribute in AD. i thought it would have been as simple as -co but it seems not so simple.

    Many thanks

    Trevor George

  • #21227
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    There may not be a parameter to New-ADUser that sets that attribute directly, but it does have a fallback option that allows you to set any LDAP attribute that you need: -OtherAttributes. This parameter takes a hashtable of ldap attribute names to values:

    New-ADUser -OtherAttributes @{ 'co' = 'COValue' } # etc
    
  • #21291
    Profile photo of Trevor George
    Trevor George
    Participant

    Hi Dave. Thanks for that. i shall give it a go later

You must be logged in to reply to this topic.