Task Sequence as specific User

Niclas 96 Reputation points
2021-06-14T13:55:15.347+00:00

Hey everyone,
first and foremost: I'm fairly new to MDT but as of now I feel like I have a solid grasp on what to do or where to find out what to do.
Since our Client does not currently have a Windows Server and the Hardware would not support us setting up one, we decided to go with Local User Accounts and to deploy / configure the Laptops using a VM on our Server instead.
So far I've gotten most things to work, but I have been trying to make it, so my Custom Tasks (mostly basic CMD Commands, some reg edits and a few PS scripts) are being executed as the user "Owner" (which is part of the local Admin Group) instead of the build in Administrator account.
When i change the AutoLogon Component inside the unattended.xml of my Task Sequence I indeed get logged into the right user during deployment, but it does not continue the Task sequence from there (I assume it fails to run LTIApply.wsf)
I have also had no success setting the user in the "Run As" box of my "Run Command Line" Tasks, i assume this is because some of them require Admin privileges.
The FirstLogonCommands Component in the unattended.xml were also with little to no success.
There has to be something I'm missing here

Thank you for the help in Advance
Kind Regards
Niclas

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
884 questions
0 comments No comments
{count} votes

Accepted answer
  1. Niclas 96 Reputation points
    2021-06-22T21:27:21.617+00:00

    Daily attempt of trying to answer to this thread #5

    I have figured out what i did wrong:
    I have imported the script as an application without source files, so instead of in the Applications folder the file was in the %SCRIPTROOT% directory.
    Doing that i crippled the ability for the script to reference the VBS file.
    I fixed this by editing the script

    In conclusion: you were right I did miss something, thank you!


1 additional answer

Sort by: Most helpful
  1. Colin Ford 1,026 Reputation points
    2021-06-14T20:34:51.083+00:00
    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.