How to automate creating AD users with PowerShell and Excel

Generally I create new users by copying a Template user I created in AD and adding it to the correct OU, but I want to know how to automate new users with excel or basic PowerShell script that will copy the Template User from AD

How can this be done

There are literally thousands of examples for such a task out there in the internet. Some good points to start searching are:

https://www.powershellgallery.com/

and

https://gallery.technet.microsoft.com/scriptcenter/

Here is an article for you to start with.
https://social.technet.microsoft.com/wiki/contents/articles/24541.powershell-bulk-create-ad-users-from-csv-file.aspx

new-aduser is the powershell command to build a new user.
https://docs.microsoft.com/en-us/powershell/module/addsadministration/new-aduser?view=win10-ps

you can use a csv file for input, so you should also read up on import-csv
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-6

or just a simple google search…
https://social.technet.microsoft.com/wiki/contents/articles/24541.powershell-bulk-create-ad-users-from-csv-file.aspx
https://gallery.technet.microsoft.com/scriptcenter/Powershell-script-to-ebf1e9bc

as always, don’t run someone else’s code if you don’t understand what its doing

Here’s a very basic example:

Users.csv:

name,path
js,"OU=People,DC=powershell,DC=org"
js2,"OU=People,DC=powershell,DC=org"

users.ps1:

import-csv users.csv | new-aduser -whatif

What if: Performing the operation "New" on target "CN=js,OU=People,DC=powershell,DC=org".
What if: Performing the operation "New" on target "CN=js2,OU=People,DC=powershell,DC=org".