As an enterprise administrator, the daily most basic task is to delete and create the daily users; also we know that the Microsoft system with dsquery commands can help us solve the problem of user, computer bulk query, delete, disable and move to have good help, but if you want to specify user disable and delete can also be achieved, But it's a lot of trouble, is there a better way, certainly has ah, that is the script, but seems to say that the batch two words everybody must think of is the script, generally is uses the foot to realize the batch to use, today is for everybody to explain how to bulk disable the specified user and will disable the user to move to the specified OU
Environment Introduction:
Domain name:gawain.com
Operation:
First, create a user on ad and create a specified OU that disables the move of the user
User: Zhangsan, Lisi
Ou:disableusers
2. Install the active Directort module for Windows PowerShell
3. After installation, open the script file: