This PowerShell script interactively removes a Windows machine from its current domain or workgroup and joins it to a new Active Directory domain.
- User-friendly interactive input
- Secure credential handling
- Error handling with feedback
- Automatic restart after join
- PowerShell 5.1+
- Administrator rights
- Windows 10/11 or Server 2016+
-
Right-click the script file and select "Run with PowerShell" or run in an elevated PowerShell terminal:
.\JoinDomain.ps1
-
Enter the required information when prompted:
- Current domain/workgroup username and password
- Target domain name
- New domain credentials
- Passwords are collected using
Read-Host -AsSecureStringand never stored or printed. - You can safely run this script on sensitive systems.
This project is licensed under the MIT License. See the license file for details.
Please use the Issue > New Issue button to submit issues, feature requests or support issues directly to me. You can also send an e-mail to akin.bicer@outlook.com.tr.