Create a new user profile

Started by seckner, September 05, 2017, 09:41:15 AM

Previous topic - Next topic

seckner

I'm not thinking this through correctly: I want to create a new user profile on a computer. Computer name = work1, user name is Scott. Scott has never logged into work1. I know there is already a way to create the c:\users\scott account on computer work1, I simply can't see the way. A not so gentle shove in the right direction would be appreciated!   

td

You might find the following  useful:

http://forum.winbatch.com/index.php?topic=1891.0

Are you trying to write a script or are you looking for general Windows help?  Which version of Windows are you targeting?   Are you attempting to create a local account or a Windows Network account?  Have you searched the Tech Database for examples - there are serveral - ?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

seckner

I'm sorry Tony, I told ya I wasn't right today. Scripting solution for Windows 10 clients. I'm trying to create a new user account on the computer. I have 70 new computers for my staff so I want to add their user account to their laptops without having to physically log into each one. I hope that makes sense..

td

This Tech Database article illustrates creating a user:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Networks~-~Servers/Microsoft~Client/wNT+Adding~Users~and~Setting~Flags.txt

The user's profile will not be created until the user logs in interactively.  If you want one created before hand for some reason, this article shows a rough approximation of how that might be done:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Miscellaneous+Create~User~Profile.txt

Note that you would need to get the new user's token which the above article does not illustrate.

I haven't tried either script on Windows 10 but don't know  of any reason that they will not work given proper process security elevation.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

A couple of additional comments regarding Windows 10 user accounts.

The Network Extender's wntUserAdd function works just fine to create regular local user accounts.  However, if for some unknown reason you want to create a "Microsoft Account" on the local system, things get a little trickier.  A local account is made a MSFT account by adding about three registry settings in an area of the registry that is off limits to even local administrators.  It is possible to make the required changes but you would need to create the correct binary values and run the script as "System".  MSFT makes this hard because they do not want MSFT Accounts to be created programmatically. After all, they know best how you should manage "your" computer system...   

If you happen to be using Windows 10 Enterprise and need to create an "Azure" user account,  you will likely need to use the ADSI Extender to create it.  As far as I can tell, Azure accounts are not substantially different than an account on any privately maintained Active Directory Windows Network.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade