码迷,mamicode.com
首页 > 系统相关 > 详细

Powershell 将User组的成员复制到新组中去

时间:2017-11-21 10:49:26      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:powershell

 

$accounts = (net localgroup users |Select-String -Pattern ‘aac‘) -replace "\n"

Foreach ($account in $accounts) {

If($account –contains“Domain Users”) {

return;

}

netlocalgroup ClientGroup $account /add

}


本文出自 “聚首云端 智领未来” 博客,请务必保留此出处http://unicom.blog.51cto.com/4454793/1983672

Powershell 将User组的成员复制到新组中去

标签:powershell

原文地址:http://unicom.blog.51cto.com/4454793/1983672

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!