power shell
Ace_xiao
这个作者很懒,什么都没留下…
展开
-
使用shell命令批量删除ou下的人员所在某个ou下里的所有组成员身份
power shell 命令:#其实就是一个双循环$user=Get-aduser -searchbase "OU=离职人员,OU=LeaveUser,DC=test,DC=local" -searchscope "onelevel" -filter * | foreach{$_.DistinguishedName}foreach($users in $user){Get-adgroup -sea...原创 2018-03-29 16:00:35 · 774 阅读 · 0 评论 -
使用脚本实现定期查询exchange2013/2016的代理主键服务修复
脚本命令如下:##全部状态查询function state{get-exchangeserver| foreach{ Get-ServerComponentState -Identity "$_.Name"}}##筛选组建异常的function proxyInactive{state | where {$_.state -eq "InActive"}}#proxyInactive##执行状态修正p...原创 2018-05-11 17:42:38 · 242 阅读 · 0 评论