SCCM – Add Local User During OSD [2024 Updated]

SCCM - Add Local User During OSD

Table of Contents

Last updated on February 25th, 2024 at 04:42 pm

Read Time:1 Minute, 24 Second

If you want to add a local machine user to your deployed machine during your SCCM OSD process then you can do this using a standard “Run Command Line” step.

Instructions

So, you need to add a “Run Command Line” step in your task sequence towards the end, after the Windows deployment and after the ConfigMgr Client install. You should then give it a meaningful name and use the following command line:

cmd.exe /c net user LocalAdmin Pa55w0rd# /add /comment:"Local Admin Account" /expires:never /fullname:"Local Admin Account"

Each of these parts is detailed below and can be changed to your own requirements:

  • cmd.exe /c – required to run a successful command
  • net user – run the “net user” command
  • LocalAdmin – name of the local admin account you want to create
  • Pa55w0rd# – the password of the local admin account you want to create
  • /add – to add the user
  • /comment:”Local Admin Account” – this is the description of the local account
  • /expires:never – means the account will never expire (note account NOT password will never expire)
  • /fullname:”Local Admin Account” – full name details for the local account

When you have completed this, you should have something that looks a little like this:

1

Now when the task sequence runs through it will run this command and add the local user. Note that this will add the user as a “Standard” user, if you want to then make this user (or any other local user) a local administrator then take a look at our guide for this here.

Feedback

If you have any feedback about this guide, please feel free to leave us a message below using our comments section.

Click to rate this post!
[Total: 1 Average: 5]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 441 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.


7 thoughts on “SCCM – Add Local User During OSD [2024 Updated]

  1. I add this step and the other one to create a local account and add it to the administrator group. But, OSD fails with an 0x00000002 error code.

  2. Hi
    With this way you may have a security problem with the logs. The sccm logs will have the user and password in plain text, someone may found it and use account.
    You can delete the logs after the installation or use just use a package(powershell with secure string, c++ program etc…) that add the user, it may be decrypted also but is more difficult.

  3. I add this step and the other one to create a local account and add it to the administrator group. But, OSD fails with an 0x00000002 error code.

  4. Hi
    With this way you may have a security problem with the logs. The sccm logs will have the user and password in plain text, someone may found it and use account.
    You can delete the logs after the installation or use just use a package(powershell with secure string, c++ program etc…) that add the user, it may be decrypted also but is more difficult.

Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.