Powershell Remove "Limited Access" - 金大昊(jindahao)
对于有多级web获取getlist会报错:Exception calling “GetList” with “1” argument
$SPWeb = Get-SPWeb -Identity http://192.168.0.50:81/oasite/
#注意getlist的写法
$list = $SPWeb.GetList("/oasite/Lists/Facilities and Shared Assets")
$item = $list.Items| where{ $_.Name -eq "北京10F第五会议室"} $return = $item.RoleAssignments |where {$_.RoleDefinitionBindings -eq $SPWeb.RoleDefinitions["受限访问"]}; foreach ($i in $return)
{
Write-Host "Removing: " $i.Member;
$item.RoleAssignments.Remove($i.Member);
}
断开权限继承
$SPWeb = Get-SPWeb -Identity http://192.168.0.50:81/oasite/
$list = $SPWeb.GetList("/oasite/Lists/Facilities and Shared Assets") $item = $list.Items| where{ $_.Name -eq "北京10F第五会议室"}
$item.BreakRoleInheritance(true) $return = $item.RoleAssignments |where {$_.RoleDefinitionBindings -eq $SPWeb.RoleDefinitions["受限访问"]}; foreach ($i in $return)
{
Write-Host "Removing: " $i.Member;
$item.RoleAssignments.Remove($i.Member);
}
Powershell Remove "Limited Access" - 金大昊(jindahao)的更多相关文章
- 移动,企业社交(sharepoint2013)--jindahao(金大昊)
MobileIncreasingly, a major component of sharing and collaborating involves mobile access. SharePoin ...
- 导出你的GAC Assembly中的DLLS -- 金大昊(jindahao)
导出你的GAC Assembly中的DLLS 方法1: CMD命令中,进入C:\windows\assembly,然后XCOPY GAC_MSIL c:\temp /E 这样就得到了dlls了,以 ...
- PowerShell Remove all user defined variable in PowerShell
When PS scripts executes, it is possibly create much user defined variables. So, sometimes these var ...
- Remove “Quick Access” entry in Eclipse Juno
Here is a quick hack which doesn't require any plugin installation, instead you just need to add a f ...
- sharepoint 开发相关工具总结
1.CAML Designer 2013 开发caml用 http://biwug-web.sharepoint.com/SitePages/Caml_designer.aspx 2.SharePoi ...
- sharepoint获取exchange邮箱报错:该帐户无权模拟所请求的用户
现象: sharepoint获取exchange邮箱报错:该帐户无权模拟所请求的用户 处理办法: 1.Open the Exchange Management Shell 2.输入: New-Mana ...
- sharepoint 2013 文件“/_controltemplates/SPMRB/AllStatBookingsForm.ascx”不存在
现象: 文件“/_controltemplates/SPMRB/AllStatBookingsForm.ascx”不存在. 分析: 此代码在sp2010好用,但是在sp2013则报以上错误. 解决办法 ...
- SharePoint2013 - 移动文档
In SharePoint 2010, the easiest way to transfer documents from one library to another involved using ...
- facebook api之Access and Authentication
Access and Authentication There are three access levels to the Marketing APIs. You can upgrade acces ...
随机推荐
- SQL SERVER 使用select和union插入多条数据
insert into A(A) select '2' union select '3' union select '100' go select * from A
- Java知多少(108)数据库查询简介
利用Connection对象的createStatement方法建立Statement对象,利用Statement对象的executeQuery()方法执行SQL查询语句进行查询,返回结果集,再形如g ...
- win7激活
应亲戚要求,装了次win7系统,重新删除分区,格盘,重新划分好分区.完毕.发现系统分区全自动变成动态磁盘.使用win7激活工具时,注意选择使用 小马通用版激活工具. 动态磁盘 稍后解释 小马工具
- js-计时事件
JavaScript 一个设定的时间间隔之后来执行代码,称之为计时事件. 主要通过两个方法来实现: 1.setInterval() - 间隔指定的毫秒数不停地执行指定的代码. 2.se ...
- fpmmm(mpm)监控mysql模块安装
zabbix mpm监控mysql是一个蛮不错的监控模块,不过最近官网已经不叫mpm了,而是叫fpmmm,理由为: fpmmm is the successor of mpm. mpm was ren ...
- Spring基础—— 泛型依赖注入
一.为了更加快捷的开发,为了更少的配置,特别是针对 Web 环境的开发,从 Spring 4.0 之后,Spring 引入了 泛型依赖注入. 二.泛型依赖注入:子类之间的依赖关系由其父类泛型以及父类之 ...
- Scrum1.2--spring计划
项目功能--深入分析 燃尽图
- js页面跳转整理(转载未整理)
js方式的页面跳转1.window.location.href方式 <script language="JavaScript" type="text/java ...
- f4: Facebook’s Warm BLOB Storage System——Erasure Code
Facebook在OSDI 2014上发表论文f4: Facebook's Warm BLOB Storage System,这个系统主要目的就是降低存储成本,在容忍磁盘,主机,机架,数据中心的同时提 ...
- SQLDMOHelper
在网上传闻SQLDMO是个好东西,当时没有注意这个传闻是什么时候了,后来才在微软的官网上看见,从SQL Server2008开始就不用SQLDMO了,取而代之的是SMO.无奈了,还写了个Helper. ...