How to use BAT script to join and exit a domain
Editor to share with you how to use the BAT script to join the domain and exit the domain, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Join and exit a domain using BAT scripts
Script to join the domain:
@ echo off
Netdom join computername% / domain:test.com / UserD:user / PasswordD:pass / REBoot:5
@ echo off
Netdom remove computername% / domain:test.com / UserD:user / PasswordD:pass / REBoot:5
The above two batch scripts are executed by calling the netdom tool that comes with xp support tools. So, we need to package and execute this batch file with the netdom.exe command.
In addition, as a reminder, you can set up a normal account and write into the two parameters of this script by delegating permission to join the domain, one is UserD and the other is PasswordD.
The above is all the contents of the article "how to use BAT scripts to join and exit domains". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!