What's New

Offline Domain Join with MDT 2013 and Windows Operating System

Adding computers to the domain is difficult when the computers are not part of your network and don't have access to the Active Directory infrastructure. We have to come up with a solution on how to join computers to the domain offline.

Okay, to do this we will need to create two PowerShell scripts. One script will provision the computer into your Active Directory and the other script is to run the djoin command on the offline client in order to perform the offline join operation.

Step One: Provision a computer


$data=gc c:\DeploymentShare\Scripts\BTNHD\ComputerName.txt
$data | foreach {
write-host "ComputerName" $_
invoke-expression "djoin /provision /domain bjtech.edu /machine $_ /REUSE 
/savefile $MDTJoinComputerNameFileLocation\$_"

Step Two: Re-run the DJoin command with in Task Sequence

$working=split-path -parent $MyInvocation.MyCommand.Definition
$computer = gc env:Computername
$sysroot = gc env:systemroot
$strfile=join-path $working "BTNHD\$computer"
invoke-expression "djoin /requestODJ /loadFile $strfile /windowspath 
$sysroot /localos"
About BjTechNews (1056 Articles)
An IT guy trying to learn everything about technology and sharing it with you all. I'm a blogger and video blogger who highlights daily news in the tech industry, promoting tips and hacks for fellow techies.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: