Link to home
Start Free TrialLog in
Avatar of Kedgeboy
Kedgeboy

asked on

using NET command to Create a user and expire their password?

Hello

I need to write a batch script which will create a user, add them as an admin and then ask them to change their password at next login.

The script I have at the moment is:

net user Admin changeme /add
net localgroup Administrators Admin /add

This creates the user "Admin" and sets their password to "changeme", what command would I use to make them change their password at next login?
Avatar of gidds99
gidds99
Flag of United Kingdom of Great Britain and Northern Ireland image

I dont think you can set "change password at next logon" via net user.

Here is a list of the available command line switches:

http://support.microsoft.com/default.aspx?scid=kb;en-us;251394&sd=tech
ASKER CERTIFIED SOLUTION
Avatar of gidds99
gidds99
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial