From 34a8fb523ffa67cac921128ecb07983e1557b0be Mon Sep 17 00:00:00 2001 From: Joe Workman <54448601+jworkmanjc@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:54:09 -0600 Subject: [PATCH] =?UTF-8?q?V2.7.8=20=E2=80=94=C2=A0Add=20system=20details?= =?UTF-8?q?=20to=20log=20and=20prevent=20overall=20failures=20if=20the=20l?= =?UTF-8?q?eave=20domain=20step=20fails=20(#144)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add windows version info (#142) * do not fail migration if leave domain step fails (#143) --------- Co-authored-by: Ken Maranion <97972790+kmaranionjc@users.noreply.github.com> --- ModuleChangelog.md | 15 +++++++++++++++ jumpcloud-ADMU/JumpCloud.ADMU.psd1 | 2 +- jumpcloud-ADMU/Powershell/Form.ps1 | 2 +- jumpcloud-ADMU/Powershell/ProgressForm.ps1 | 2 +- jumpcloud-ADMU/Powershell/Start-Migration.ps1 | 13 ++++++++----- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ModuleChangelog.md b/ModuleChangelog.md index e0bc20fe2..1d5438426 100644 --- a/ModuleChangelog.md +++ b/ModuleChangelog.md @@ -1,3 +1,18 @@ +## 2.7.8 + +Release Date: October 14, 2024 + +#### RELEASE NOTES + +This release prevents the ADMU from considering the migration a failure if the leave domain step does not complete as expected. +This release adds Windows OS version, edition, and build number information to the log + +#### Bug Fixes: + +``` +* When the ADMU encounters an issue with leaving the domain, the tool would mark this step a failure and attempt to revert the newly created user. In doing so the account being migrated was erroneously removed. This release allows for the leave domain step to fail but does not consider the failure of that step to be an overall migration failure. Migration can still succeed if the system fails to leave the domain for any reason. +``` + ## 2.7.7 Release Date: September 25, 2024 diff --git a/jumpcloud-ADMU/JumpCloud.ADMU.psd1 b/jumpcloud-ADMU/JumpCloud.ADMU.psd1 index c3e97f668..bdfd9bd25 100644 --- a/jumpcloud-ADMU/JumpCloud.ADMU.psd1 +++ b/jumpcloud-ADMU/JumpCloud.ADMU.psd1 @@ -13,7 +13,7 @@ # Version number of this module. - ModuleVersion = '2.7.7' + ModuleVersion = '2.7.8' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/jumpcloud-ADMU/Powershell/Form.ps1 b/jumpcloud-ADMU/Powershell/Form.ps1 index 344b2fd57..ce01adfdf 100644 --- a/jumpcloud-ADMU/Powershell/Form.ps1 +++ b/jumpcloud-ADMU/Powershell/Form.ps1 @@ -153,7 +153,7 @@ function show-mtpSelection { diff --git a/jumpcloud-ADMU/Powershell/ProgressForm.ps1 b/jumpcloud-ADMU/Powershell/ProgressForm.ps1 index e1c1ce7bc..fd97c3a59 100644 --- a/jumpcloud-ADMU/Powershell/ProgressForm.ps1 +++ b/jumpcloud-ADMU/Powershell/ProgressForm.ps1 @@ -37,7 +37,7 @@ function New-ProgressForm { diff --git a/jumpcloud-ADMU/Powershell/Start-Migration.ps1 b/jumpcloud-ADMU/Powershell/Start-Migration.ps1 index a3e752a4a..11c2f66eb 100644 --- a/jumpcloud-ADMU/Powershell/Start-Migration.ps1 +++ b/jumpcloud-ADMU/Powershell/Start-Migration.ps1 @@ -1871,7 +1871,7 @@ Function Start-Migration { $netBiosName = Get-NetBiosName $WmiComputerSystem = Get-WmiObject -Class:('Win32_ComputerSystem') $localComputerName = $WmiComputerSystem.Name - $systemVersion = Get-ComputerInfo | Select-Object OSName, OSVersion, OsHardwareAbstractionLayer + $systemVersion = Get-ComputerInfo | Select-Object OSName, OSVersion, OsHardwareAbstractionLayer, OsBuildNumber, WindowsEditionId $windowsDrive = Get-WindowsDrive $jcAdmuTempPath = "$windowsDrive\Windows\Temp\JCADMU\" $jcAdmuLogFile = "$windowsDrive\Windows\Temp\jcAdmu.log" @@ -1883,7 +1883,10 @@ Function Start-Migration { $AGENT_INSTALLER_URL = "https://cdn02.jumpcloud.com/production/jcagent-msi-signed.msi" $AGENT_INSTALLER_PATH = "$windowsDrive\windows\Temp\JCADMU\jcagent-msi-signed.msi" $AGENT_CONF_PATH = "$($AGENT_PATH)\Plugins\Contrib\jcagent.conf" - $admuVersion = '2.7.7' + $admuVersion = '2.7.8' + + # Log Windows System Version Information + Write-ToLog -Message:("OSName: $($systemVersion.OSName), OSVersion: $($systemVersion.OSVersion), OSBuildNumber: $($systemVersion.OsBuildNumber), OSEdition: $($systemVersion.WindowsEditionId)") $script:AdminDebug = $AdminDebug $isForm = $PSCmdlet.ParameterSetName -eq "form" @@ -2872,7 +2875,7 @@ Function Start-Migration { $admuTracker.leaveDomain.pass = $true } else { Write-ToLog -Message:('Unable to leave Hybrid Domain') -Level:('Warn') - $admuTracker.leaveDomain.fail = $true + # here we would typically fail migration but doing so would remove the system account } } "LocalJoined" { @@ -2883,7 +2886,7 @@ Function Start-Migration { $admuTracker.leaveDomain.pass = $true } else { Write-ToLog -Message:('Unable to leave local domain') -Level:('Warn') - $admuTracker.leaveDomain.fail = $true + # here we would typically fail migration but doing so would remove the system account } } "AzureADJoined" { @@ -2904,7 +2907,7 @@ Function Start-Migration { $admuTracker.leaveDomain.pass = $true } else { Write-ToLog -Message:('Unable to leave Azure AD domain') -Level:('Warn') - $admuTracker.leaveDomain.fail = $true + # here we would typically fail migration but doing so would remove the system account } }