Forum Discussion

liamdwyer's avatar
liamdwyer
Copper Contributor
Mar 11, 2021

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

}

  • farismalaeb's avatar
    farismalaeb
    Steel Contributor
    Set-ADUser TheUserName -replace @{info="Why i am disabled"}


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

Resources