Joe Howard
asked on
Show hidden user account
Here's the situation:
I recently installed Windows 10 on a brand new machine, I created 4 users, the first one by default is the admin, the other ones are regular users.
Stupidly enough, I removed the password from the admin account, and disabled the admin account using the command line:
Is there any solution (vbs, or other) that will give me access to my admin account?
This code obviously will not run from a regular account (access denied):
secpol.msc won't even open, I get an access denied error.
lusrmgr.msc opens but I get an access denied error trying to change the settings.
This is expected but I'm hoping there is a workaround.
I recently installed Windows 10 on a brand new machine, I created 4 users, the first one by default is the admin, the other ones are regular users.
Stupidly enough, I removed the password from the admin account, and disabled the admin account using the command line:
net user UserName /active:no
Obviously, I can no longer gain admin access to the machine. I can login to the regular users.Is there any solution (vbs, or other) that will give me access to my admin account?
This code obviously will not run from a regular account (access denied):
Set objShell = CreateObject("Wscript.Shell")
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
Set colAccounts = GetObject("WinNT://" & strComputer & "")
colAccounts.Filter = Array("user")
For Each objUser In colAccounts
If objUser.Name <> "Administrator" AND objUser.Name <> "ASPNET" Then
If objUser.AccountDisabled = TRUE then
objUser.AccountDisabled = FALSE
objUser.SetInfo
End if
End If
Next
I tried two other methods, but neither worked:secpol.msc won't even open, I get an access denied error.
lusrmgr.msc opens but I get an access denied error trying to change the settings.
This is expected but I'm hoping there is a workaround.
net user administrator /active:yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@David
I get an access denied error. That command has to run from an elevated command prompt which I can't open as a limited account.
@Emmanuel
Your suggestion will reset the admin password, no? I don't think that will help, my admin privileged account (not the built in Administrator account) does not have a password.
I get an access denied error. That command has to run from an elevated command prompt which I can't open as a limited account.
@Emmanuel
Your suggestion will reset the admin password, no? I don't think that will help, my admin privileged account (not the built in Administrator account) does not have a password.
No this will not reset the admin password. the twill enable the disable admin account. Check it properly.
RUNAS requires a password
net user administrator Pa$$w0rd will set the password
net user administrator Pa$$w0rd will set the password
ASKER
@David
net user administrator Pa$$w0rd will only work from an admin account.
net user administrator Pa$$w0rd will only work from an admin account.
ASKER
Excellent!