首页 > 系统服务 > 详细

Powershell 修改组策略

时间:2020-04-09 16:16:22      阅读:216      评论:0      收藏:0      [点我收藏+]

?

参考: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

@@#

?

?

技术分享图片

?

Powershell 修改组策略

原文:https://www.cnblogs.com/QinQouShui/p/12667283.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!