Elevate User Privlidges using Powershell

PETER 61 Reputation points
2020-11-02T23:09:53.667+00:00

Is it possible to use powershell to elevate a users privlidges or create a user
with admin privlidges from a user account on windows 10 education - version 1909?

Thankyou

Note* I have tried using NET USER but that pops up a UAC window requiring Admin Privs

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,512 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ian Xue 36,336 Reputation points Microsoft Vendor
    2020-11-03T02:48:33.417+00:00

    Hi,
    You can add user to the administrators with Add-LocalGroupMember

    Add-LocalGroupMember -Group "Administrators" -Member "$YourUserName"  
    

    But you still have to run powershell as Administrator. If you want to bypass the UAC prompt, the answer is no.

    Best Regards,
    Ian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most 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.