07-03-2020 04:59 PM
A good script for enabling user account in active directory via thier employee id or username.
07-07-2020 08:31 AM
Hi @james_teach256, User accounts can be enabled with the SamAccountNames. You can place the SamAccountNames in a text file and execute the below script to enable the user accounts in bulk. Also, note that this should be executed from a domain controller.
Import-Module ActiveDirectory
# Place all the SamAccountNames in a text file
(Get-Content "C:\TEMP\ADUsers.txt") | ForEach-Object {
Enable-ADAccount -Identity $_
}