Script to disable and add description

Copper Contributor

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

}

1 Reply
Set-ADUser TheUserName -replace @{info="Why i am disabled"}


-----------
If this answer help, please click on Best Response