aboutsummaryrefslogtreecommitdiffstats
path: root/AD-powershell-tools/bulk-disable.ps1
blob: e1fd18031fa94899fef8acec9f9f78eab31b2db6 (plain)
1
2
3
4
5
6
7
8
9
10
# Import users from CSV and disable them

Import-Module ActiveDirectory

$csv = Get-Content $args[0]

ForEach ($user in $csv) {
    Disable-ADAccount -Identity $user
    Write-Host $user"'s account has been fully disabled"
}