none
login as an AD user in the task sequence RRS feed

  • General discussion

  • is it possible to have the task sequence login as a specific AD user while installing an image, I would like to run a powershell script that changes some settings for the AD user, not the built in administrator account
    Thursday, July 9, 2015 5:47 PM

All replies

  • Like this?


    If this post is helpful please vote it as Helpful or click Mark for answer.


    • Edited by Dan_Vega Thursday, July 9, 2015 6:29 PM
    Thursday, July 9, 2015 6:29 PM
  • That may be at least somewhat of a step in the right direction, although it does not appear to be available for the "Run PowerShell Script" option.

    Thursday, July 9, 2015 8:08 PM
  • Correct it's not, that's why I posted the command line task but it can still be used.

    Copy the script to your scripts folder and then use a command such as: "powershell %scriptroot%\script.ps1"


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Thursday, July 9, 2015 8:36 PM
  • It's ok, I'm just going to use the Autologon from Sysinternals to do this:

    https://technet.microsoft.com/en-us/library/bb963905.aspx?f=255&MSPPError=-2147217396

    do you know if there is a decent way to set powershell script variables for the deployment? The user name and temporary password has to be set for each deployment for the Autologon to work, not sure if there is a simple way to accomplish this or if it's going to be a manual process to make that happen.

    I doubt it is possible, but I'd like to be able to set powershell variables in the task deployment initialization phase where it asks you about joining to a domain and what the computer name is going to be.

    Monday, July 13, 2015 1:06 PM
  • Logging in as an AD user will likely break your Task Sequence.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, July 13, 2015 8:36 PM
    Moderator
  • Yea, I tried the Autologon and as soon as it had an AD user login, the Task Sequence did not continue, do you know why that happens?
    Tuesday, July 21, 2015 12:57 PM
  • For the same reason a task sequence breaks if the administrator account is renamed. MDT relies on the local "Administrator" account to execute all the scripts and tasks.

    Maybe you can use this - http://deploymentresearch.com/Research/Post/427/Final-Configuration-for-MDT-2013-Lite-Touch-now-with-Autologon-support

    You could set the autologon count to 1 and add a runonce to the registry to execute your script. Then after the system is imaged it'll reboot logon as the user you defined and run the command you added to the runonce section of the registry.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Tuesday, July 21, 2015 1:08 PM