From be71e00d990211292e1fb1508de2f48ab414f8a8 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Thu, 16 Oct 2025 00:35:52 -0400 Subject: Add fixed AD scripts and discord stuff --- AD-powershell-tools/bulk-disable.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 AD-powershell-tools/bulk-disable.ps1 (limited to 'AD-powershell-tools/bulk-disable.ps1') diff --git a/AD-powershell-tools/bulk-disable.ps1 b/AD-powershell-tools/bulk-disable.ps1 new file mode 100644 index 0000000..e1fd180 --- /dev/null +++ b/AD-powershell-tools/bulk-disable.ps1 @@ -0,0 +1,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" +} -- cgit v1.2.3