Join/Quit Windows Domain

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
-
Is it possible to join pc to not default OU?
0 -
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!
0 -
Where is the joindomain.ps1 file?
1 -
the joindomain.ps1 file is being created during the procedure execution. See the lines about echo.
0 -
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#'
0 -
Sorry I'm a little new to this . What would I make line 7 look like if I wanted it to join the domain and put it in a specific OU.
Line 7 currently looks like this:
echo Add-Computer -DomainName '#domain#' -Credential $creds -Restart -Force >>>> #vAgentConfiguration.agentTempDir#\JoinDomain.ps1
Would this be it:
echo Add-Computer -DomainName '#domain#' -OUPath=MDM,DC=mydomain,DC=local-Credential $creds -Restart -Force >>>> #vAgentConfiguration.agentTempDir#\JoinDomain.ps1
0