Skip to content

Commit

Permalink
V2.7.8 — Add system details to log and prevent overall failures if th…
Browse files Browse the repository at this point in the history
…e leave domain step fails (#144)

* 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>
  • Loading branch information
jworkmanjc and kmaranionjc authored Oct 14, 2024
1 parent 825cced commit 34a8fb5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
15 changes: 15 additions & 0 deletions ModuleChangelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion jumpcloud-ADMU/JumpCloud.ADMU.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Version number of this module.

ModuleVersion = '2.7.7'
ModuleVersion = '2.7.8'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
2 changes: 1 addition & 1 deletion jumpcloud-ADMU/Powershell/Form.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function show-mtpSelection {
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="JumpCloud ADMU 2.7.7"
Title="JumpCloud ADMU 2.7.8"
WindowStyle="SingleBorderWindow"
ResizeMode="NoResize"
Background="White" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" Width="1020" Height="590">
Expand Down
2 changes: 1 addition & 1 deletion jumpcloud-ADMU/Powershell/ProgressForm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function New-ProgressForm {
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="Window" Title="JumpCloud ADMU 2.7.7"
Name="Window" Title="JumpCloud ADMU 2.7.8"
WindowStyle="SingleBorderWindow"
ResizeMode="NoResize"
Background="White" Width="720" Height="550 ">
Expand Down
13 changes: 8 additions & 5 deletions jumpcloud-ADMU/Powershell/Start-Migration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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" {
Expand All @@ -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" {
Expand All @@ -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
}

}
Expand Down

0 comments on commit 34a8fb5

Please sign in to comment.