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)) {
|
if ([boolean](get-variable "DomainOU" -ErrorAction SilentlyContinue)) {
|
||||||
try {
|
try {
|
||||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential -OUPath $DomainOU -Restart
|
Add-Computer -DomainName technolog.net -Credential $DomainCredential -OUPath $DomainOU
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Couldn't join the domain with OU $DomainOU"
|
Write-Host "Couldn't join the domain with OU $DomainOU"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
Add-Computer -DomainName technolog.net -Credential $DomainCredential -Restart
|
Add-Computer -DomainName technolog.net -Credential $DomainCredential
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Couldn't join the domain!"
|
Write-Host "Couldn't join the domain!"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user