Disable user account in Windows 10 and Windows 11

NndnG 1,126 Reputation points
2022-09-22T19:46:13.977+00:00

Hi,

To disable a user account, we use ways as

  1. Using Command Prompt; net user <username> /active:no
  2. Using Computer Management window, navigate to System Tools > Local Users and Groups > Users.
  3. Using wmic command; wmic useraccount where name='user-name' set disabled=true

net user <username> /active:no works fine, if username is like Johm, Mike, etc.

If username is like Jo Ann M. Jones, Albert.David or any typical name, the command doesn’t work successfully. Mostly it shows error.

I used it like net user “Jo Ann M. Jones” /active:no and net user ‘Jo Ann M. Jones’ /active:no still it shows an error message.

Let me know how to use the Command Prompt for such typical username?

Computer Management window, navigate to System Tools > Local Users and Groups > Users doesn’t work in Home edition.
If any way so that it can work in Home edition, please let me know.

With Regards
NndnG

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-09-22T20:00:26.16+00:00

    Take a look in the C:\Users directory. The folder names here should reflect the actual %username% which you should be able to use in above commands.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.