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.
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.
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.
-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.
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. :)
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!
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. :)
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
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.
Thank you so much for this video. This will save me a huge amount of time trying to mirror access for different users.
Awesome 😎
@@ShanesCows Just a follow up questions. What if there are multiple domains, how do I change domain using the powershell ?
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.
Best of luck!
you guys are doing a great job.. thanks to all
Thank you
Thanks a lot for your nice video collection. hope to see more videos from you.
Thanks
Very cool PowerShell.
Thanks
Great video, is there a way to use a csv file input file to bulk activate users? Firstname, lastname, sam, etc
Thanks for the video :) it was helpful!!
😎
Excellent job .... Can you create a Video on hit the AAD sync cycle and assign the license in Office 365 ?
I have a video on licenses already.
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.
btw loving your content Shane. Learned a lot through your videos. Thanks!
Plz make a video on commando vm installation and using of it and installation of tools in that vm using powershell
Never used it. Sorry
May I know how to copy a user template with Extension Attributes and pass to the new user?
Hi Jerry - I forwarded this over to Todd to see if he had a thought.
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.
I have been bad about replied to these questions, haven't I? :)
I still love you.
-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.
I pinged Todd to see if he has thoughts.
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. :)
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!
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. :)
how to you copy a user if the user template isnt in the default OU ?
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.
was there ever a follow up to this?
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
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.
Can I do this in azure devops??
Not sure. I haven’t tried. Sorry