Creating AD Users from a template with PowerShell

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

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

  • @thokchomloletsingh5236
    @thokchomloletsingh5236 3 года назад +2

    Thank you so much for this video. This will save me a huge amount of time trying to mirror access for different users.

    • @ShanesCows
      @ShanesCows  3 года назад +1

      Awesome 😎

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

      @@ShanesCows Just a follow up questions. What if there are multiple domains, how do I change domain using the powershell ?

  • @khush1980
    @khush1980 3 года назад +1

    Hey Guys great work....I am putting into practise some functions for create ad user. I will keep trying and come up with something, but you have given me some ground work to start it all off :) Thanks.

  • @ranguleo01
    @ranguleo01 5 лет назад +1

    you guys are doing a great job.. thanks to all

  • @mnasirizadeh6007
    @mnasirizadeh6007 5 лет назад +1

    Thanks a lot for your nice video collection. hope to see more videos from you.

  • @keithcorser1911
    @keithcorser1911 4 года назад +1

    Very cool PowerShell.

  • @adolphhernandez7615
    @adolphhernandez7615 Год назад +2

    Great video, is there a way to use a csv file input file to bulk activate users? Firstname, lastname, sam, etc

  • @nitinveludandi
    @nitinveludandi 3 года назад +1

    Thanks for the video :) it was helpful!!

  • @ManojYadavIT
    @ManojYadavIT 4 года назад +1

    Excellent job .... Can you create a Video on hit the AAD sync cycle and assign the license in Office 365 ?

    • @ShanesCows
      @ShanesCows  4 года назад

      I have a video on licenses already.

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

    maybe create the users from csv and use a switch containing the variables for that usertype.
    You could create a column in your csv and use those value to trigger a different reaction and thus different variables from the switch.

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

      btw loving your content Shane. Learned a lot through your videos. Thanks!

  • @techkingnepal7555
    @techkingnepal7555 4 года назад +1

    Plz make a video on commando vm installation and using of it and installation of tools in that vm using powershell

  • @jerrycai5964
    @jerrycai5964 6 лет назад +1

    May I know how to copy a user template with Extension Attributes and pass to the new user?

    • @ShanesCows
      @ShanesCows  6 лет назад

      Hi Jerry - I forwarded this over to Todd to see if he had a thought.

    • @PendragnTK
      @PendragnTK 5 лет назад

      Hi Jerry. You should be able to specify any attribute of the user you want, including an Extension Attributes. I just tried this and it worked:
      Get-ADUser -Identity _Template1 -Properties city,homepage,state,country,postalcode,msDS-cloudExtensionAttribute1
      It spit out the value of that attributed.

  • @PendragnTK
    @PendragnTK 5 лет назад +3

    I have been bad about replied to these questions, haven't I? :)

  • @Turco949
    @Turco949 5 лет назад +1

    -Instance function doesn't seem very efficient. I don't understand why the manual copying of an account brings over most attributes and all group membership yet PS doesn't bring anything by default, if nothing was specified? It doesn't seem like a true "copy" process but more like creating a shell user account from scratch. I much rather create a new account from a .csv and then assign the GMs.

    • @ShanesCows
      @ShanesCows  5 лет назад +1

      I pinged Todd to see if he has thoughts.

    • @PendragnTK
      @PendragnTK 5 лет назад +1

      Different approaches are better for different situations. If using this method doesn't work as well as your existing process then you shouldn't use it. :)

    • @Turco949
      @Turco949 5 лет назад +1

      Thanks Todd. I know and agree with what you are saying. I do get mad at the complexity of PS time to time compared to Windows batch scripting, longer worded commands to do the same job it seems very complex, case in point, PS command Get-ChildItem does the same job as "Dir" command, etc but as much as I criticize PowerShell in some ways, I do realize the complexity is a by product of how much more powerful it is compared to CommandLine, not to mention the ongoing development and additions to it.
      I do appreciate you sharing your input via videos and comments. Cheers!

    • @PendragnTK
      @PendragnTK 5 лет назад +1

      I, too, am frustrated with how much more complicated PowerShell makes things over good old CMD. Tab complete helps, and like you said, you get something for all of that extra work. I've moved to Acceptance. :)

  • @nickyandersonuk1
    @nickyandersonuk1 6 лет назад +1

    how to you copy a user if the user template isnt in the default OU ?

    • @ShanesCows
      @ShanesCows  6 лет назад

      Hey Nicky - I am trying to get Todd to chime in with his thoughts. Fingers crossed. You can tweet him @ToddKlindt if you are on Twitter.

    • @Joshua-mw8xf
      @Joshua-mw8xf 6 лет назад

      was there ever a follow up to this?

    • @mmageekbkk
      @mmageekbkk 5 лет назад

      you can retrieve the distinguishedname property then split off the first part to obtain the OU value of the template, then use that as a variable for the -path attribute when creating the new user:
      $OU = $u.DistinguishedName.split(",",2)[1]
      New-ADUser -SamAccountName "alonso2" -instance $u -DisplayName "alonso2 mosely" -UserPrincipalName "alonso2@domain.com" -Name "alonso2" -Path $OU

    • @PendragnTK
      @PendragnTK 5 лет назад

      The -SearchBase parameter of Get-ADUser lets you specify a location. Though I have been able to get a user that was not in the default OU without specifying a SearchBase.

  • @dylanb.5762
    @dylanb.5762 4 года назад +1

    Can I do this in azure devops??

    • @ShanesCows
      @ShanesCows  4 года назад

      Not sure. I haven’t tried. Sorry