This topic contains 5 replies, has 4 voices, and was last updated by
October 11, 2018 at 3:48 pm #113825
How to enable admin account by local user account.
Earlier, I disabled the existing Admin account with admin rights.
October 11, 2018 at 3:54 pm #113831ParticipantTopics: 2Replies: 397Points: 689Rank: Major Contributor
Should do the trick, provided the account running it has the necessary access to do so. I think Windows always ensures at least one administrative account is active at any given time, usually.
October 11, 2018 at 4:02 pm #113834
but user account have a not permission for this.
[PS C:\> Enable-LocalUser Administrator
Enable-LocalUser : Access denied.
At line:1 char:1
+ Enable-LocalUser Administrator
+ CategoryInfo : PermissionDenied: (Administrator:LocalUser) [Enable-LocalUser], AccessDeniedE
+ FullyQualifiedErrorId : AccessDenied,Microsoft.PowerShell.Commands.EnableLocalUserCommand]
October 12, 2018 at 1:44 pm #113932ParticipantTopics: 23Replies: 138Points: 245Rank: Participant
You will need to execute the cmdlet with an account that has administrative privileges on the computer.
October 13, 2018 at 2:25 pm #114010
Thank you to provide your opinion,
but can you show cmdlet which I need to write.
October 13, 2018 at 3:24 pm #114016ModeratorTopics: 8Replies: 736Points: 2,059Rank: Community Hero
I can give you a hint, If you know PowerShell, you should be able to identify what cmdlets can do run as kind off... else please take the time to learn PowerShell and will be one of the best investment you have ever done.
Get-Command -ParameterName Credential
The topic ‘How to Enable Admin account by user account with powershell ise’ is closed to new replies.