开发者

Is there anyway to add a user to multiple groups in sharepoint 2010?

开发者 https://www.devze.com 2023-03-30 02:11 出处:网络
I need to add 20 users to 30 different groups in SharePoint. Is there anyway to add a user to multiple groups in sharepoin开发者_开发百科t 2010 at the same time?You can use Powershell to achive this

I need to add 20 users to 30 different groups in SharePoint.

Is there anyway to add a user to multiple groups in sharepoin开发者_开发百科t 2010 at the same time?


You can use Powershell to achive this task Open notepad and write the following script

Add-PSSnapin Microsoft.sharepoint.powershell
$Groups =("Group1","Group2")
foreach($g in $Groups)
{
  Set-SPUser -Identity 'domain\username' -Web http://yoursite -Group $g
}

Now save this script with PS extension then by right click on it you can run this script.
More information check the following article Set-SPUser
Regards.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号