Microsoft has helped to make things easier for us and has created a powershell script that can be and. In the command line box i. I ve been using your domain join powershell script for the past couple of years via mdt and it has been a god send.