Тёмный

How to Create AD Users from CSV 

Server Academy
Подписаться 79 тыс.
Просмотров 28 тыс.
50% 1

Опубликовано:

 

6 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 44   
@ServerAcademy
@ServerAcademy 4 года назад
Hey Guys - so I messed up at 14:49 and forgot to include "-surname $user.'Last Name'" after "-GivenName" - please be sure to include that or see my tutorial page for the correct syntax.
@marlonmorales951
@marlonmorales951 4 года назад
When I run your syntax, Account is created as disabled. I have another question, I was able to add the User Logon name, but script did not select my UPN @example.com ... Thanks for your help and good tutorial
@ServerAcademy
@ServerAcademy 4 года назад
@@marlonmorales951 You have to add -enabled to the end of the command otherwise it will default to creating disabled users. UPN is inferred I belive.
@kevinandgina9101
@kevinandgina9101 3 месяца назад
I really appreciate this as I am in an AD DS Class for online Bachelors in cyber security and there is absolutely no direction and no instructions and I am new to this part of the IT world. So thank you for the videos and keep them coming.
@michaelrichardson8467
@michaelrichardson8467 4 года назад
Just getting into scripting and some of this went over my head, like the brackets towards the end. But honestly for never even writing a script successfully after watching this I was able too, and not just using your files, which I did appreciate for creating the .csv and all the commands and their parameters. I can not thank you enough tools and videos like this are easier for me to digest than trying to read something. I work for a small IT company and we have a client that has ad and all their users were still using one account to login to every machine 🤦‍♂️🤦‍♂️ I was not only able to come in and add 30 users in five minutes but was able to set up certain users with roaming profiles as well. Seriously thank you for this. This video really opened up my understanding
@ServerAcademy
@ServerAcademy 4 года назад
Awesome!! Lol at your story about AD and all the users used a single user account. Fix them up!
@giiretech8005
@giiretech8005 4 года назад
I like that idea its awesome and l also one of your student on Udemy Active Directory & Group Policy Labs. You are a good instructor thanks i really appreciate that
@potolozi3983
@potolozi3983 4 года назад
Extremely valuable. Thank you for making this kind of content available!
@sanjayjoshi7605
@sanjayjoshi7605 3 года назад
Your presentation skills are very much appreciable. Thanks, buddy!
@learneasyfasterwhatyouneed250
@learneasyfasterwhatyouneed250 3 года назад
Great content about Power Shell and created users via CSV with PowerShell
@streetglidescott6424
@streetglidescott6424 4 года назад
Very helpful, thanks! Subscribed, set notification and reminder! Can you help with 2 things? 1) Daily import from HR Provided DSV -- How to avoid overwriting? 2) If we already have user John Doe (Johns) and hire John Dalton, John Dapper and John Dapplen , how can I automate the login creation to reflect John Dalton =johnda, john dapper = johndap and John Dapplen = johndapp (if login exists, add an additional character to last initial value)
@ServerAcademy
@ServerAcademy 4 года назад
Definitely! I would write a function with a name something like "DoesUserExist" and I would have it return either true or false. Inside of that function you need to run a Get-ADUser command and search for the user you want to create. If you get a result, return true, else return false. When you call the function, if it returns true then you append a number to the user name and rerun the check to see if that user exist. If it does, then you increment the number and check again. For this part you would probably want to use a while loop. Something like while ($UsernameIsInUse) { ... code to increment number on user name ... } Hard to convey over comments - but hopefully this helps.
@davem45
@davem45 10 месяцев назад
great tutorial! Is there any opportunity to get any 1:1 support? I would like to make a few modifications, but honestly, I'm not sure where to start, and my PowerShell knowledge is very beginner. Thanks
@brandonluciano8133
@brandonluciano8133 4 года назад
Thanks for this video, really clear and informative. really appreciate it.
@priyaangadi8603
@priyaangadi8603 3 года назад
Thank you so much sir... Please add the vedio same like this for active directory termination
@rickyray2794
@rickyray2794 Год назад
Thanks this helped a lot. the only thing is I got an error at the steps starting at 19:05. Where did "Add Groups (csv)" come from? Is that the name of your csv file?
@jbway86
@jbway86 Год назад
Fyi. Csv files with tabs do work. You have to cast it when importing csv. Forgot the syntax. I think its [t`] (letter t and a back tick).
@kakashiHatake-is8em
@kakashiHatake-is8em 2 года назад
ADUsers : The term 'ADUsers' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:2 char:1 + ADUsers = Import-CSV C:\Users\Administrator\Desktop + ~~~~~~~ + CategoryInfo : ObjectNotFound: (ADUsers:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Facing this error
@pa1089
@pa1089 4 года назад
Hello Paul. Thank you for the video really helpful. How would I create exchange mailboxes for the same users once the AD users are created? Do I need to use for each syntax again? Thank you
@ServerAcademy
@ServerAcademy 4 года назад
What I would do is after block at line 55-59 where we add the user to the groups, I would call the "New-MailBox" command. Of course this may require you to run the script from your exchange server assuming you have on-premises. I think it would also be wise to check if the user was actually created first (i.e. not a duplicate username) before creating the mail box or even adding them to the group as you don't want to accidentally add the wrong user to a group or create mailbox for the wrong user. Off the top of my head a try / catch combined with get-aduser would help you accomplish this.
@pa1089
@pa1089 4 года назад
Thank you very much Paul for the reply. So just the “New-Mailbox” command with $Username after that? Can you please provide me with an example command if possible? Thank you again
@ServerAcademy
@ServerAcademy 4 года назад
Definitely refer to the Microsoft docs (link below) but its a long command like the New-ADUser command: docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/new-mailbox?view=exchange-ps#examples .. There are also examples on that page like this: New-Mailbox -UserPrincipalName chris@contoso.com -Alias chris -Database "Mailbox Database 1" -Name ChrisAshton -OrganizationalUnit Users -Password $password -FirstName Chris -LastName Ashton -DisplayName "Chris Ashton" -ResetPasswordOnNextLogon $true
@pa1089
@pa1089 4 года назад
Thank you I will cross check the documentation too but why would I need to put in password parameter again as it was created earlier?
@ServerAcademy
@ServerAcademy 4 года назад
@@pa1089 I did some more looking into this and it appears that the New-MailBox command is not what you want in this scenario. This is because the new-mailbox ALSO creates a new AD user (in our script we already did that) and that is why you saw the $password variable.. So what you actually want is Enable-Mailbox - This command allows you to create mailboxes for existing users who don't have a mailbox yet... docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/enable-mailbox?view=exchange-ps#examples So something like: Enable-Mailbox -identity $UserName
@sheransheran7976
@sheransheran7976 2 года назад
useful video, but plz how can i create OU's in the same way?? i have been tried for a long time but it has not worked! 😪. I need to create excel.csv file and then i need powershel script to run it
@grandtheftautovideos9938
@grandtheftautovideos9938 2 года назад
How can multiple group memberships be defined/separated in the spreadsheet? With a space, comma, or semicolon?
@slowfreak3718
@slowfreak3718 4 года назад
thank you!
@afghanoutsider
@afghanoutsider 4 месяца назад
it is so complicated out of my head
@2ndbase330
@2ndbase330 4 года назад
IF you could explain why you indent certain line and not others
@ServerAcademy
@ServerAcademy 4 года назад
Hey - this is for formatting purposes only so it makes it easier to read. More information here: en.wikipedia.org/wiki/Indentation_style#:~:text=In%20computer%20programming%2C%20an%20indentation,recommended%20for%20maximum%20code%20readability.
@satyendrayadav2837
@satyendrayadav2837 3 года назад
how to get AD user last logon details using csv (in csv username exist)
@DrkWng17
@DrkWng17 Год назад
Can you do this with Python?
@ashishsingh4693
@ashishsingh4693 4 года назад
Thank. Brooooooo
@ServerAcademy
@ServerAcademy 4 года назад
Sure thing brrrrrrrooooo :D
@ashishsingh4693
@ashishsingh4693 4 года назад
@@ServerAcademy bro how extract hardware and software details through powershell remotely
@gibson7654
@gibson7654 4 года назад
5:20 my $dialog command turns red instead of green and I don't get that list. Instead nothing happens when I press enter.
@honestphiri5011
@honestphiri5011 4 года назад
did you manage to resolve this?
@gibson7654
@gibson7654 4 года назад
@@honestphiri5011 I have not. Sorry.
@justme-iz7ec
@justme-iz7ec Год назад
smoothe
@nallakulasatyavenkatesh1001
@nallakulasatyavenkatesh1001 2 года назад
Thanks :pray::pray::pray:
@nicolaspivaut6362
@nicolaspivaut6362 2 года назад
WriteHost : Le terme «WriteHost» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez. Au caractère C:\script3final.ps1:59 : 13 + WriteHost "Added $Username to $_ group" # Log to console + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (WriteHost:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Далее
Active Directory Tutorial for Beginners
28:45
Просмотров 1,6 млн
would you eat this? #shorts
00:13
Просмотров 1,7 млн
Active Directory automation with PowerShell
1:34:38
Просмотров 135 тыс.
Windows Pentest Tutorial (Active Directory Game Over!)
1:49:45
PowerShell Scripting Tutorial
45:42
Просмотров 12 тыс.
Bulk Install Windows Update MSU Files with PowerShell
13:41
How to create Active Directory Users with Powershell
9:57
Troubleshooting account lockouts in Active Directory
26:46