PowerShell Script to Add/Remove/Update Users from CSV File to Active Directory

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 16

  • @OmniMonitor
    @OmniMonitor 2 роки тому

    Ok, I have concerns about the deletion aspect. My CSV files will not contain all AD users. Does that mean it will delete all the users in AD that are not in my CSV file? My guess is that it won't, but this script does more than I want and I am fairly inexpeiced with PS. I just want to find a way to update users accounts from a CSV.

  • @ohmamata2879
    @ohmamata2879 3 роки тому +1

    Do you have a csv file (template) that you use within script? Please help upload . Thanks a lot.

  • @07venky
    @07venky 4 роки тому

    How to enable manager can update the member list for a distribution group via Powershell

  • @Popongkee
    @Popongkee 6 років тому +1

    Hello there, great video and very informative. What script would you suggest for updating an attribute editor value in AD per user without a csv file? Thank you.

    • @RocketCityTech
      @RocketCityTech  6 років тому

      You can visit this link docs.microsoft.com/en-us/powershell/module/addsadministration/set-aduser?view=win10-ps that will give you all of the available attributes that can be set with the Set-ADUser command.
      So for example, if you didn't want to have to import a CSV, you could run this to set the attribute for ALL users, notice the wildcard for the "Name -like" that will catch all users in the OU:
      "Get-ADUser -Filter 'Name -like "*"' -SearchBase 'OU=HumanResources,OU=UserAccounts,DC=FABRIKAM,DC=COM' -Properties DisplayName | % {Set-ADUser $_ -DisplayName ($_.Surname + ' ' + $_.GivenName)}"

  • @raz8657
    @raz8657 5 років тому

    Hello there - The script file can't find it, has this moved? I need this script

  • @jasonstarr6419
    @jasonstarr6419 6 років тому

    Our IT Security group is migrating something like 2500 users from an internal proxy to a cloud proxy and we'll be doing large groups by adding a new ACL to the member groups. Can this script be modified to simply add a new group to the selected list of .csv users rather than deleting and reinstating? Since our team is relatively new (company is 42 years old, our IT Security team as a viable entity is only 2 years old), we're going to be reviewing all the AD ACLs and trying to ensure least privilege.

    • @RocketCityTech
      @RocketCityTech  6 років тому +1

      Jason Starr most definitely that is possible. Your CSV file could be built to only include the group that they need to be added to, then the script modified to only add users to that group and leave existing groups in place.

    • @jasonstarr6419
      @jasonstarr6419 6 років тому

      Thank you.

  • @dullysikes
    @dullysikes 7 років тому

    where do we get the script.

    • @RocketCityTech
      @RocketCityTech  7 років тому

      dullysikes I'll try to post it soon.

    • @dullysikes
      @dullysikes 7 років тому

      cant wait

    • @RocketCityTech
      @RocketCityTech  7 років тому +1

      I have updated the video description and included a link to view/download the script. pastebin.com/HmV4ZCAT

    • @dullysikes
      @dullysikes 7 років тому

      Rocket City Tech awesome just got a job and was tasked with updating active directory. This should come in handy.

  • @waiid6625
    @waiid6625 7 років тому

    thank's :)