New AD-User

This topic contains 2 replies, has 2 voices, and was last updated by  Trevor George 3 years, 7 months ago.

  • Author
  • #21226

    Trevor George

    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

    Dave Wyatt

    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

    Trevor George

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

You must be logged in to reply to this topic.