From 1ee5438c9264cb3f694972c951287992f1af076e Mon Sep 17 00:00:00 2001 From: iRaven4522 Date: Tue, 14 Oct 2025 01:52:19 -0500 Subject: [PATCH] do not restart on domain join with MDT --- MDT-JoinDomain.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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!" }