Forum Discussion
liamdwyer
Mar 11, 2021Copper Contributor
Script to disable and add description
I was hoping to find someone that could add the correct stanza's to my script.
I am disabling in bulk AD accounts and I need to add something to the description like when disabled.
This is the script I am using....
$File = Import-Csv -Path "termedusers.csv"
foreach
($employeeID in $termedusers)
{
Set-ADUser
-Identity $Name -Enabled $False
}
- farismalaebSteel ContributorSet-ADUser TheUserName -replace @{info="Why i am disabled"}
-----------
If this answer help, please click on Best Response