TheJumpCloud / jumpcloud-ADMU

JumpCloud Active Directory Migration Utility - JCADMU
23 stars 7 forks source link

SA-3527 fix ad status for leave domain #98

Closed kmaranionjc closed 1 year ago

kmaranionjc commented 1 year ago

Issues

What does this solve?

Current leave domain AD Status condition does not work since a variable that should contain a status value is not set.

Is there anything particularly tricky?

How should this be tested?

  1. Run the ADMU prod with leave domain set to $true
    • Run this script after:
      $ADStatus = dsregcmd.exe /status
                      foreach ($line in $ADStatus) {
                          if ($line -match "AzureADJoined : ") {
                              $AzureADStatus = ($line.trimstart('AzureADJoined : '))
                          }
                      }
    • $AzureADStatus Should be set to 'YES'
  2. Run ADMU with the new changes then do same process above, $AzureADStatus should be set to "NO"

Screenshots