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 ...
随机推荐
- Cobbler批量安装Ubuntu/CentOS系统
2013-07-25 一.安装和修改cobbler配置 1. Cobbler不在CentOS的基本源中,需要导入EPEL源升级软件包, 确保epel-release包的版本为最新,当前最新版本为 ...
- Unit Of Work--工作单元(二)
回顾 上一篇我们根据工作单元的原理基于ADO.NET进行了简单的实现,但是当项目需求发生变化的时候,比如需要引入ORM框架又要兼容当前ADO.NET实现的方式时,先前的实现就无法满足这个需求了. 话就 ...
- 对C#对象的Shallow、Deep Cloning认识【转】
好像园内比较多博客对 Shallow.Deep Cloning的翻译是深拷贝.浅拷贝,当时我懵了,这个叫法怎么怪怪的. 就好像看军情观察室,台湾评论员,导弹叫飞弹. 至于它们的区别,一张图就可以解释. ...
- 实现无锁的栈与队列(5):Hazard Pointer
两年多以前随手写了点与 lock free 相关的笔记:1,2,3,4,质量都不是很高其实(读者见谅),但两年来陆陆续续竟也有些阅读量了(可见剑走偏锋的技巧是多容易吸引眼球).笔记当中在解决内存释放和 ...
- aliyun ubuntu mysql
http://www.codingyun.com/article/38.html ------------ python install mysql module ubuntu下mysql-pytho ...
- Android加载SO库UnsatisfiedLinkError错误的原因及解决方案
Android 应用开发者应该对 UnsatisfiedLinkError 这种类型的错误比较熟悉了,这个问题一直困扰着广大的开发者,那么有没有想过有可能你什么都没做错,也会出现这个问题呢? 我们在 ...
- AngularJS 监控对象属性:$watch和$digest
监控对象属性:$watch和$digest $watch和$digest是相辅相成的.两者一起,构成了Angular作用域的核心:数据变化的响应.如果你学习过WPF,并基于WPF使用过一些MVVM框架 ...
- 数据可视化(2)--Justgage
JustGage 是一个 JavaScript 插件来生成很漂亮的仪表盘,基于 Raphaël 库做向量图绘制. JustGage 完全基于 SVG,因此支持几乎所有浏览器,包括:IE6+, Chro ...
- [git]安装git-pylint-commit-hook提高python项目中的代码质量
什么是'git-pylint-commit-hook' 我在工作中,团队为了保证代码和提高代码的质量,要求每个项目都要求安装git-pylint-commit-hook,它是个钩子,会在你提交代码到本 ...
- 我的WCF学习与强化系列文章
1.WCF服务创建与使用(请求应答模式) 2.WCF服务创建与使用(双工模式) 3.WCF序列化 4.WCF实现方法重载 5.WCF会话(Session)与实例(Instance)管理 后面会继续更新 ...