powershell: change user rights assignment RRS feed

  • Question

  • I am a powershell novice. On a given windows 10 system, I restrict log on to a few domain users as follows:

    - run gpedit.msc

    - click on: Configure Computer -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> Allow Log on Local -> add user (domain\userid)

    I would like to do the same thing using powershell commands. Is it possible to do that?


    • Moved by Bill_Stewart Wednesday, September 13, 2017 10:10 PM This is not "scripts on demand"
    Thursday, August 10, 2017 6:53 PM

All replies

  • Normally we do not add user accounts directly to that policy.   Allow logon locally is set by adding users to either the local "Users" group or to the "Domain Users" group.

    There are no CmdLets in PowerShell to edit specific GPOs.  There are advanced methods for editing a GP template and assigning it to a container.


    Thursday, August 10, 2017 7:06 PM
  • http://www.morgantechspace.com/2014/11/Set-Allow-Log-On-Locally-User-Rights-via-Powershell-CMD-CSharp.html

    Best regards,
    Pavel Volkov
    MCP, MS: Configuring Windows Devices, Hyper-V and SCVMM
    MCSA: Windows 10/Server 2012/Server 2016/SQL 2016 Database Development
    MCSE: Mobility, Cloud Platform and Infrastructure

    Please remember to mark the replies as answers if they help...

    Thursday, August 10, 2017 7:12 PM