New AD-User

Welcome Forums General PowerShell Q&A New AD-User

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
3 years, 10 months ago.

  • Author
    Posts
  • #21226

    Participant
    Points: 0
    Rank: Member

    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

    Member
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

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

The topic ‘New AD-User’ is closed to new replies.