How do I enable or disable a domain user from the command line in Windows Server 2003?

A. You can use the "Dsmod user" command with the -disabled switch to enable a user account

dsmod user <user's distinguished name (DN)> -disabled no

or disable a user account

dsmod user <user's DN> -disabled yes

For example, to enable user John in domain, I typed

dsmod user CN=John,CN=Users,DC=it,DC=uk,DC=savilltech,DC=com –disabled

The system returned

dsmon succeeded:CN=John,CN=Users,DC=it,DC=uk,DC=savilltech,DC=com
TAGS: Windows 8
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.