There is a known issue when you're setting Legal Notice text and caption in GPO and when deploying in MDT, the Legal Notice is popping up during auto logon. I fix it by saving JoinDomain to another variable SavedJoinDomain and join to domain before the last step in the task sequence.

Here are the steps

  1. Add a new custom property to your customsettings.ini
    Properties=MyCustomProperty, SavedJoinDomain
  2. Modify Scripts\ZTIDomainJoin.wsf by commenting out those two lines:

          oLogging.CreateEntry "Initiating a reboot.", LogTypeInfo
          oEnvironment.Item("LTISuspend") = ""
          ' oEnvironment.Item("SMSTSRetryRequested") = "true"
          ' oEnvironment.Item("SMSTSRebootRequested") = "true"
  3. Create a new temporary task sequence and ovewrite TS.XML from CONTROL\<Your TS ID> with TS.XML attached to this post
  4. Copy "Save JoinDomain" group and paste it to your TS before Preinstall\Configure
  5. Copy "Restore JoinDomain" group and paste it to your TS before State Restore\Recover From Domian. See attahced picture.
  6. In the following "Recover From Domian" step make sure it's Auto Recover
  7. Make sure there are no following reboots after this step
  8. You can delete temporary task sequence now