PowerShell AD域管理命令-示例(陆续添加)

时间:2014-10-17 19:02:54   收藏:0   阅读:205

获取密码即将过期用户的信息,90天有效期的话,获取过期前7天的密码

Get-ADUser -filter * -searchbase "ou=kewendangdang,dc=dangdang,dc=com" -Properties *|where {($_.passwordlastset -lt (Get-Date).adddays(-83)) -and ($_.passwordneverexpires -ne "True")}|select name,samaccountname >>e:\seven.csv


评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!