Announcement

Collapse
No announcement yet.

bulk Update attribute in AD, best way to get this done?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • bulk Update attribute in AD, best way to get this done?

    Hi All

    I have a question on something I need to tackle within my enterprise.

    We about to purchase a solution which integrates our smart cards with Active Directory to facilitate room bookings in our building.

    For this to work I need to add a specific number as a Active Directory attribute or custom attribute.

    Doing this for every user will be a major pain so I am looking at a solution to do this at a bulk level.

    I hear products built into Windows like 'csvde' may be able to help or other 3rd party paid tools which have a GUI interface.


    I am thinking of using either the 'pager' attribute under AD, telephones tab or using a custom attribute field. However I will need to use Exchange Administrator tools to view this field as I believe its not possible to see this under AD users and computers?

    As the users are already created, I just need to update the 'pager' or 'custom attribute 1' field without amending any other details. Would this be possible?

    I have a test AD environment which a copy of the live AD environment. I am planning on testing this before I roll out to live production. I have details of users and their card number but I also need to extract of copy of the usernames in AD so I can marry the two data sets together.

    Appreciate any advice anyone can give me with this.

  • #2
    In one word: PowerShell
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Originally posted by Ossian View Post
      In one word: PowerShell
      Thanks, any sources for information for me to do further reading?

      Comment


      • #4
        to the rescue: https://blogs.technet.microsoft.com/...-modification/
        A recent poll suggests that 6 out of 7 dwarfs are not happy

        Comment


        • #5
          ADModify. I use this regularly when we need to make changes to multiple user accounts.

          https://admodify.codeplex.com/

          Comment


          • #6
            Originally posted by Ossian View Post
            In one word: PowerShell
            I found a powershell script online which allows me to extract from AD all usernames and pager details. I think it might do what I need it to do.


            Get-ADUser -Filter * -Properties sAMAccountName, pager | Select sAMAccountName, pager | Export-Csv .\UserPagers.csv -NoTypeInformation

            So I made a couple of amendments to the pager attribute on a few test users on the CSV file and then imported the file back into AD.

            Import-Csv -Path .\UserPagers.csv | ForEach {Set-ADUser $_.sAMAccountName -Replace @{pager="$_.pager"}}

            However I found that now each user in the 'pager' attribute now has the following set (using the user ORSTestUser3 as example):

            @{sAMAccountName=ORSTestUser3; pager=}.pager

            What have I done wrong?

            Comment


            • #7
              I'm not a PS user, but this page here has an example that may help: https://richardspowershellblog.wordp...ng-set-aduser/
              A recent poll suggests that 6 out of 7 dwarfs are not happy

              Comment


              • #8
                First, the value of the pager attribute appears on the "Telephones" tab of ADUC. You can use the Get-ADUser cmdlet to retrieve all usernames and any existing pager values. By username I assume you mean the sAMAccountName (pre-Windows 2000 logon name), since that uniquely identifies the user objects in AD. The Common Name (the value of the cn attribute) does not. A PowerShell script to export all usernames and pagers to a csv would be:

                Get-ADUser-Filter*-Properties sAMAccountName, pager |Select sAMAccountName, pager |Export-Csv.\UserPagers.csv -NoTypeInformation

                Comment

                Working...
                X