Skip to content

This PowerShell script interactively removes a Windows machine from its current domain or workgroup and joins it to a new Active Directory domain.

License

Notifications You must be signed in to change notification settings

cynegeirus/interactive-domain-join-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🔐 Domain Join Script (Interactive)

This PowerShell script interactively removes a Windows machine from its current domain or workgroup and joins it to a new Active Directory domain.

🧩 Features

  • User-friendly interactive input
  • Secure credential handling
  • Error handling with feedback
  • Automatic restart after join

💻 Requirements

  • PowerShell 5.1+
  • Administrator rights
  • Windows 10/11 or Server 2016+

▶️ Usage

  1. Right-click the script file and select "Run with PowerShell" or run in an elevated PowerShell terminal:

    .\JoinDomain.ps1
  2. Enter the required information when prompted:

    • Current domain/workgroup username and password
    • Target domain name
    • New domain credentials

🛡️ Security Notes

  • Passwords are collected using Read-Host -AsSecureString and never stored or printed.
  • You can safely run this script on sensitive systems.

📜 License

This project is licensed under the MIT License. See the license file for details.

🙌 Issues, Feature Requests or Support

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.

About

This PowerShell script interactively removes a Windows machine from its current domain or workgroup and joins it to a new Active Directory domain.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published