Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating Users Using Net User

Featured Replies

Hi Guys,

I am trying to create a local account using the net user command.

So far, I have added an account by using the command net user username password /add

This only creates the account as a normal user account and I need it to be a member of the administrators group.

Is there anyway you can do this using this command or similar command?


Heya,

You Could use the line:

net localgroup "Administrators" username /add

Or...

@Echo Off
Cls

::Enter username to be added
Set ChangeUser=Chris.Casey

::Enter group user to be added to
Set DestinationGroup=Administrators

Echo Adding user...
NET LOCALGROUP "%DestinationGroup%" %ChangeUser% /Add
Echo.
Echo Added %ChangeUser% to the %DestinationGroup% group.
Echo.
Pause
Exit

Save as adduser.bat

Hope this helps!!

SilverB.

Edited by SilverBulletUK

As an after thought, to add a few users, and add them to groups try this...

AddUsers.bat

@Echo Off
FOR /F "skip=14 tokens=1,2,3 delims=:" %%a IN (Users.ini) DO CALL :ProcessINI %%a %%b %%c
GOTO :EOF
:ProcessINI
Set XPCDUser=%~1
Set XPCDPass=%~2
Set XPCDGroup=%~3
IF '%XPCDUser%'=='' GOTO :USRCLEAN
IF '%XPCDPass%'=='' SET XPCDPass=password
IF '%XPCDGroup%'=='' SET XPCDGroup=Users
NET USER %XPCDUser% %XPCDPass% /ADD>>NUL
Echo %XPCDUser% added to local system accounts
NET LOCALGROUP "%XPCDGroup%" %XPCDUser% /ADD>>NUL
Echo Added %XPCDUser% to %XPCDGroup% group
:USRCLEAN
Set XPCDUser=
Set XPCDPass=
Set XPCDGroup=
:EOF

Users.ini

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::Please all user accounts to be added to the local machine
::::under the [StartUserAccounts] label, in the following format;
::::
::::Example1= Jamie:Jamiespassword:Administrators
::::Example2= Helen:secret:Users
::::
::::Context: Username:Password:Group
::::
::::Please ensure to use ':' and not ';' in user lines.
::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[StartUserAccounts]

Just add all the users you need in the Users.ini file, each on a new line.

Edited by SilverBulletUK

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.