Hi @Abdulrahman ,
yes. But without any details of the users it's hard to help with details.
There are different options to identify the affected users:
- If you have a list of the user-names in a file
- If you have a criteria of the users (for instance same department name)
- If all users are members of the same AD group
Basically you need this cmdlet:
Disable-ADAccount (https://learn.microsoft.com/en-us/powershell/module/activedirectory/disable-adaccount?view=windowsserver2022-ps)
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten