diff --git a/MDT-JoinDomain.ps1 b/MDT-JoinDomain.ps1 index 62e773a..4916fda 100644 --- a/MDT-JoinDomain.ps1 +++ b/MDT-JoinDomain.ps1 @@ -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!" }