In Vista and Windows 7, administrator account is disabled by default. This account can be enabled by running the following command from elevated administrator command prompt.
net user administrator /active:yes
See How to open elevated command prompt.
Disable administrator account
net user administrator /active:no
Query the status of administrator account
net user administrator
Using WMIC commands
To enable administrator account:
wmic useraccount where name='administrator' set disabled='false'
To disable administrator account:
wmic useraccount where name='administrator' set disabled='true'
In Windows XP, administrator account is not disabled as in Vista and Windows 7. But we can still use the above commands to disable/re-enable administrator account.
{ 0 comments… add one now }