winddows account logon hours

Posted tingxin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了winddows account logon hours相关的知识,希望对你有一定的参考价值。

# deny logon at all times
$user = [ADSI]"LDAP://cn=Joe Bloggs,ou=Test,dc=Manticore,dc=org"
[byte[]]$hours = @(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
$user.logonhours[0] = $hours
$user.setinfo()

## allow logon at all times
$user = [ADSI]"LDAP://cn=Joe Bloggs,ou=Test,dc=Manticore,dc=org"
[byte[]]$hours2 = @(255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255)
$user.logonhours[0] = $hours2
$user.setinfo()

 

## allow logon 8am – 6pm Monday to Friday
$user = [ADSI]"LDAP://cn=Joe Bloggs,ou=Test,dc=Manticore,dc=org"
[byte[]]$hours3 = @(0,0,0,0,255,3,0,255,3,0,255,3,0,255,3,0,255,3,0,0,0)
$user.logonhours[0] = $hours3
$user.setinfo()

以上是关于winddows account logon hours的主要内容,如果未能解决你的问题,请参考以下文章

winddows下如何查看进程端口占用杀死进程教程

Python:登录网站

Css 在 asp.net mvc3 Razor Views 中无法正常工作

使用 LOGON32_LOGON_NETWORK 从 Delphi 反复调用 LogonUser 会导致帐户被锁定吗?

Audit logon events&Logon type

LogonUser 返回 ERROR_NO_LOGON_SERVERS