TheJumpCloud / jumpcloud-ADMU

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

Sa 3471 admu disable scheduled tasks #101

Closed kmaranionjc closed 1 year ago

kmaranionjc commented 1 year ago

Issues

What does this solve?

Some scheduled tasks prevents migrations from occuring. This change disables tasks that are on "Ready" state before the migration to ensure migration runs without tasks preventing it.

Is there anything particularly tricky?

Checking if the tasks are disabled in the middle of the migration

How should this be tested?

  1. Open two PWSH terminal, for migration and task check
  2. Run this command to check the pre-migration tasks that are not Windows and Ready: Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "*\Microsoft\Windows*" -and $_.State -ne "Disabled" -and $_.state -ne "Running" }
  3. Run ADMu
  4. In the middle of migration, check if the tasks from pre-migration check are disabled: Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "*\Microsoft\Windows*" -and $_.State -eq "Disabled" }
  5. Lastly, after the migration, check if pre-migration tasks are set to "Ready": Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "*\Microsoft\Windows*" -and $_.State -ne "Disabled" -and $_.state -ne "Running" }

Screenshots

Pre:

image

Mid and after migration:

image