Set-ADAccountStatusByOu
1.0
Set-ADAccountStatusByOu sets the status of accounts (enabled or disabled) by an entire Organizational Unit. You may specify the OU by name or distinguished name. Enabling or disabling is handled by the Enable or Disable switch parameters, with Disable being the default. The SearchScope parameter is for controlling whether child ojbects of the OU are also affected.
In
In
Set-ADAccountStatusByOu sets the status of accounts (enabled or disabled) by an entire Organizational Unit. You may specify the OU by name or distinguished name. Enabling or disabling is handled by the Enable or Disable switch parameters, with Disable being the default. The SearchScope parameter is for controlling whether child ojbects of the OU are also affected.
In the event that there are multiple OUs in the domain named the same, a menu is given showing all the distinguished names found, and the option to use all or a specific OU to set user statuses.
This script is best used to run as a Scheduled Task to automatically disable users that are put into specifice OUs, like one for ex-employees. If used in this way, specify the Force parameter. This will stop any user input being requested and default to a choice of All.
Show more
In the event that there are multiple OUs in the domain named the same, a menu is given showing all the distinguished names found, and the option to use all or a specific OU to set user statuses.
This script is best used to run as a Scheduled Task to automatically disable users that are put into specifice OUs, like one for ex-employees. If used in this way, specify the Force parameter. This will stop any user input being requested and default to a choice of All.
Installation Options
Owners
Copyright
(c)2018 Chris Carter
Package Details
Author(s)
- Chris Carter
Tags
ActiveDirectory Accounts Disable Enable OU
Functions
Get-Dn Select-Dn Get-Choice Disable-User Enable-User Set-AllAccounts
Dependencies
This script has no dependencies.
Release Notes
Initial Release
FileList
- Set-ADAccountStatusByOu.nuspec
- Set-ADAccountStatusByOu.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.0 (current version) | 159 | 12/6/2018 |