更改组设置的PowerShell脚本 [英] PowerShell Script to Change Group Settings

查看:69
本文介绍了更改组设置的PowerShell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有数百个用于不同人力资源部门的SharePoint组.我使用PowerShell脚本编写了脚本,该脚本使用csv文件读取和创建组.  脚本中没有发生的一件事(因为我不确定如何)是 配置组设置.

I have a few hundred SharePoint groups for different HR departments.  I scripted these in with a PowerShell script that used a csv file to read and create the groups.  One thing that didn't happen on the script (because I wasn't sure how) was to configure the group settings.

我正在尝试编写一个PowerShell脚本,该脚本将通过csv并遍历各个组,然后将组设置"更改为:

I am trying to write a PowerShell script that will go through the csv and loop through the groups and then change the Group Settings to:

谁可以查看该组的成员资格?大家

Who can view membership of the group? Everyone

谁可以编辑组的成员资格?小组成员

Who can edit the membership of the group? Group Members

我已经看到了各种PowerShell命令来执行此操作,但是它似乎并未涵盖这两个设置.  

I have seen various PowerShell commands to do this but it doesn't appear to cover both settings.  

是否有人拥有可以通过CSV循环访问一组列表并将上述组设置应用于每个组的PowerShell脚本?

Does anyone have a PowerShell script that can loop through a list of groups from a CSV and apply the above group settings to each group?

谢谢.

乔恩

推荐答案

基本上,只需将每个组作为一个对象退出,然后设置以下两个属性即可.

BAsically its just a matter of retirieving each group as an object and then setting the following two properties

OnlyAllowMembersViewMembership-这是一个布尔值,用于设置每个人都可以看到组成员身份(False)还是仅该组成员可以看到(true).

OnlyAllowMembersViewMembership - This is a boolean that sets whether the group membership can be seen by everyone (False) or only by members of the group (true).

AllowMembersEditMembership-这是有关组成员是否可以编辑成员资格的布尔值.对于组成员,则为True;对于所有者,则为False.

AllowMembersEditMembership - This is a boolean on whether group members can edit the membership.  True for Group Members to edit and False for Owners only.

类似这样的东西.

 


Web = Get-SPWeb
Web = Get-SPWeb


SiteURL

 


这篇关于更改组设置的PowerShell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆