Join/Quit Windows Domain

Douglas Sanchez
Douglas Sanchez Member, Kaseya Certified CHOCOLATE MILK
edited January 24 in Solutions

Product Name: Join/Quit Windows Domain

Description : This set of agent procedures allows you to add or remove any endpoints to your Windows Domain.
There are two versions of each script. One prompting you for the credentials and domain name prior to executing so you can fill as needed.
The second version uses static variables you will need to modify with the correct credentials for better automation.

Instructions :

Upload the procedure with the Import Folder/Procedure tool in the Agent Procedures module under Schedule / Create

Comments

  • Dmitrij Kondrasov
    edited November 2019

    Is it possible to join pc to not default OU?

  • Gareth Thorley
    Gareth Thorley Member CHOCOLATE MILK
    edited November 2019

    If you want the PC to join a specific OU, you could add the following parameter, to line 7 of the Agent Procedure

    -OUPATH "OU=Tills,OU=Store Devices,OU=Domain Operations,DC=YourDomain,DC=local"

    If you want to specify your own OU, you will need to create additional GetVariable lines, and then reference the variable in Line 7.

    Hope this helps!

  • Nick Abdullah
    Nick Abdullah Member CHOCOLATE MILK
    edited February 2021

    Where is the joindomain.ps1 file?

  • Rob Allison
    Rob Allison Member CHOCOLATE MILK

    the joindomain.ps1 file is being created during the procedure execution. See the lines about echo.

  • Rob Allison
    Rob Allison Member CHOCOLATE MILK

    I had to edit the script to include the domain variable in front of the username so it would join Windows 10 PCs to the domain. Without this the scrip runs but the PC does not join the domain. Can get around this but you end up putting the domain in twice so by doing this I take advantage of the prompts fields.

    echo UserName = "#admin# -> echo UserName = '#domain#\#admin#'