zoukankan      html  css  js  c++  java
  • Powershell 修改组策略

     

    参考:https://blog.51cto.com/infosec/788731

    参考:http://intsir.com/index.php/archives/351/

    参考:https://www.windowspasswordsrecovery.com/articles/password-policy/set-the-reset-account-lockout-counter-after-setting-in-windows-8-1-8-7.html

     

    参考:http://intsir.com/index.php/archives/351/

     

    推荐方法

    @@@code

    Function SetPolice() {

    $gpstr = @"

    [version]

    signature=""`$CHICAGO`$""

    [Privilege Rights]

    SeDenyRemoteInteractiveLogonRight = Administrator,Guest

    [System Access]

    LockoutBadCount = 4

    ResetLockoutCount = 60

    LockoutDuration = 60

    "@

     

    [System.IO.File]::WriteAllText("./gp.inf",$gpstr,[System.Text.Encoding]::Default)

    secedit /configure /db gp.sdb /cfg gp.inf #/quiet

    del gp.inf

    del gp.sdb

    }

     

     

    @@#

     

    方法二:

    @@@code

    net accounts /lockoutthreshold:5

    net accounts /lockoutduration:60

    net accounts /lockoutwindow:60

    ntrights -r SeDenyRemoteInteractiveLogonRight -u "administrator"

    # https://www.tenforums.com/attachments/tutorials/228748d1553724608-allow-prevent-users-groups-shut-down-system-windows-10-a-ntrights.zip

    @@#

     

     

     

  • 相关阅读:
    三维几何模板
    凸包
    计算几何 部分模板
    几何模板
    高斯消元模板
    tarjin求割点
    在无向图中找最短桥(tarjan)
    线段树
    错排问题
    NABCD分析
  • 原文地址:https://www.cnblogs.com/QinQouShui/p/12667283.html
Copyright © 2011-2022 走看看