This is probably more of a question for you powershell pros out there.

In our environment, we use MDT to image laptops and install some apps using task sequences. We then manually log off the local admin account, and log in as a domain user (domain user is not a local admin). From there we run a few different powershell scripts to install some more apps/settings that need to be run as the new logged on user.

My goal is to automate the process of logging off after the image deploys, logging in as the domain user, continuing task sequences and then call PDQ scripts so that I can have them deploy with admin privileges but run as logged on user.

So, I'd like to create an MDT task sequence that would call a powershell script to:

  1. Prompt for what username and password I want to log in as
  2. Log off
  3. Log in with those credentials From there MDT would continue task sequences that would call PDQ packages.

Now that I've typed this out, this seems to be asking a lot and improbable. I'm no powershell expert tho. Plus I'm not sure MDT would be able to continue the task sequences after logging as a different user. We image several hundred PC's a year between 4 of us, so this would be a huge time saver.

Cancel
login to comment