locked
Windows Powershell - Is there a way to view all the local security policies and edit them through powershell? RRS feed

  • Question

  • I am working on  securing a computer and I want to cut down the time of when I secure computers in the future from 30 minutes to 30 seconds.  I am using windows powershell script to do this.  The only problem is that whenever I try to find ANYTHING for the local security policies (IE: Password Policies, Account Lockout Policies, Firewall, Administrative Templates), it won't let me.  And I have not found a list online of the commands to do this.  I found the commands for one or two, but no list.  Is there any list in powershell or local security policies or online that could help me with this?  Thanks!  Sorry I am new to forums so if this is duplicate or I did this wrong sorry. 
    Saturday, February 17, 2018 5:28 PM

Answers

  • To list all applied policies use GPResult.  GPO applied policies cannot be edited locally.  Local policies can only be edited with SECEDIT.


    \_(ツ)_/


    • Proposed as answer by jrv Saturday, February 17, 2018 6:12 PM
    • Edited by jrv Saturday, February 17, 2018 6:13 PM
    • Marked as answer by Richard MuellerMVP Saturday, February 24, 2018 2:01 PM
    Saturday, February 17, 2018 6:12 PM

All replies

  • Hi ProgrammingLogic,

    Please see this post: https://social.technet.microsoft.com/Forums/en-US/86cd4747-1fc6-42a0-bf36-33a92a8b6bba/powershell-local-security-policy?forum=winserverpowershell

    It can't be done with powershell.

    Regards

    Simon


    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.

    Saturday, February 17, 2018 5:45 PM
  • To list all applied policies use GPResult.  GPO applied policies cannot be edited locally.  Local policies can only be edited with SECEDIT.


    \_(ツ)_/


    • Proposed as answer by jrv Saturday, February 17, 2018 6:12 PM
    • Edited by jrv Saturday, February 17, 2018 6:13 PM
    • Marked as answer by Richard MuellerMVP Saturday, February 24, 2018 2:01 PM
    Saturday, February 17, 2018 6:12 PM