Overview

To manage local users and groups from the command line in Windows, you can use the netcommand and wmic (Windows Management Instrumentation Command-line) utility. Please note that administrative privileges are required to perform these operations.

Here is some of commands we can use the manage the local users and group from the command line / CMD.

net user Username Password /add # Creating a Local User:
net user Username secret-password # Changing a User's Password:
net user Username * # To hide the password.
net user Username /delete # Deleting a Local User:
net localgroup GroupName Username /add # Adding a User to a Group:
net localgroup GroupName Username /delete # Removing a User from a Group:

Please exercise caution when managing local users and groups, as incorrect usage of these commands can lead to unintended consequences. Always verify your actions before proceeding. Additionally, if you have PowerShell available, there are more robust cmdlets available for user and group management.