![]() C:\>wmic useraccount where name='john' set disabled=false Successful account updation would be like below. Updating property(s) of '\\MYPC\ROOT\CIMV2:Win32_UserAccount.Domain="mypc",Name="guest"' If run from command prompt without elevated admin privileges it would result in the below error. Using wmic to disable user accountīelow wmic command works for disabling a user account wmic useraccount where name='john' set disabled=trueįor re-enabling user account wmic useraccount where name='john' set disabled=false System error 5 has occurred.Īccess is denied. You would get the below error when you run them from normal command prompt. In Windows 7, you need to run the above commands from elevated administrator command prompt(See How to open elevated command prompt in Windows 7 ). ![]() To re-enable the account : Net user John /active:yes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |