Windows XP/7 Disabling Users Accounts via. CMD

How can I disable a user account from the command line?

In Windows XP or 7.


Solution 1:

net user [username] /ACTIVE:NO [/DOMAIN]

Hint: only add the /DOMAIN flag if you're not dealing with local users.