Solving Problems with PowerShell : Bulk Create Active Directory Users from a CSV

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 3

  • @MortalGamer2014
    @MortalGamer2014 3 года назад

    Hello . I have a question. How can you delete the users form the AD if the don’t exist in the CSV file . Can you help me out with a script please ?

    • @ITLumberjack
      @ITLumberjack  3 года назад

      That is a good question. I have given this type of script some thought but in the context of user share folders.
      I would first start out by pulling a list of users in AD. Make that a variable. Then compare each user in the variable to the CSV.
      To play it safe I always have scripts that delete, run a CSV report of what its going to delete. Then I will run a separate script based on the CSV file that I have audited.
      Also if you are considering deleting AD object I highly recommend using the -whatif switch.

  • @raphaelcwcable
    @raphaelcwcable 2 года назад

    Hi, the video is very useful.
    I got some questions. If I want to add an incremental number behind the same username (as some of them may have same name but different person), how can I edit my script?
    Also, I am trying to structure the Username with an initial of their first name plus their last name, $CSV_Username = ($CSV_Inital + $CSV_LastName.ToLower()), is it correct? Many thanks!