do not restart on domain join with MDT
This commit is contained in:
@@ -66,14 +66,14 @@ if ($CompType -like "WKS") {
|
||||
|
||||
if ([boolean](get-variable "DomainOU" -ErrorAction SilentlyContinue)) {
|
||||
try {
|
||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential -OUPath $DomainOU -Restart
|
||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential -OUPath $DomainOU
|
||||
} catch {
|
||||
Write-Host "Couldn't join the domain with OU $DomainOU"
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential -Restart
|
||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential
|
||||
} catch {
|
||||
Write-Host "Couldn't join the domain!"
|
||||
}
|
||||
|
Reference in New Issue
Block a user