Share Point 2013使用Windows PowerShell 获取,删除UserProFile

在SharePoint 2013(2010)中我们对于用户配置文件的操作仅限于管理中心
其中查看,新建,删除用户配置文件。

Share Point 2013使用Windows PowerShell 获取,删除UserProFile

Share Point 2013使用Windows PowerShell 获取,删除UserProFile

 
 
虽然我们可以通过如上方式查看,删除用户配置文件,但是这一对一的传统方式显得非常蹩脚
虽然SharePoint 2013(2010)提供了非常全面的PowerShell命令但是对于UPS 服务提供命令

相当有限,远不能满足我们的使用需求我们今天带来 SharePoint 2013 的第三方Snapin 扩展其

原有功能其中包括两个命令
Get-SPUserProfile
该命令将通过 “我的网站宿主”获取其中的用户配置文件

Share Point 2013使用Windows PowerShell 获取,删除UserProFile
 

你可以通过 Get-SPSite 命令 获取 我的网站宿主 网站通过管道传入方式获取该网站的用户配置文件

Share Point 2013使用Windows PowerShell 获取,删除UserProFile
 
当然如果你喜欢的话你还可以通过该命令的返回对象对用户配置文件进行更改
请注意 Get-SPUserProfile 命令将返回一个List在使用时请注意使用索引
Remove-SPUserProfile该命令将删除特定的用户配置文件
该命令只有一个参数 UserProfile 该参数将接受 由Get-SPUserProfile返回的对象作为输入 

Share Point 2013使用Windows PowerShell 获取,删除UserProFile
 
请注意 删除动作异常危险请仔细确认。


该Snapin 信息适用SharePoint 版本 SharePoint 2013/2013SP1框架版本 .NetFramework 4.0
最低WindowsPowerShell 版本 2.0下表列出该Snapin 经过测试的平台


 目标平台  可用
 Windows Server 2012R2   YES
 Windows Server 2012   YES
 Windows Server 2008R2   YES
 Windows Server 2008   未测试


下载使用file:///C:/Users/SARA/Desktop/SharePointSnapin.rar

---本文档由联科教育(http://www.iLync.cn)田梦博 原创提供,如有问题请电话:021-60745131---

 

 


本文出自 “iLync” 博客,请务必保留此出处http://ilync.blog.51cto.com/6203086/1559732

Share Point 2013使用Windows PowerShell 获取,删除UserProFile

上一篇:2. 抽象工厂


下一篇:[Windows] 批处理文件系统服务控制