When you migrate list or site, the user alerts in the site will not be migrated together with the content. Below content can help you to do this task. But please take care of it, if you operate it on Prod environment. Enable or disable alerts for Web…
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 代码如下(保存到本地ps1文件中,右键run with PowerShell即可): Add-PSSnapin microsoft.sharepoint.powershell function CreateSPLists() { $sites = Get-SPSite ) { Write-Warning "There is no site available." CreateSPLis…
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 代码如下(保存到本地ps1文件中,右键run with PowerShell即可): Add-PSSnapin microsoft.sharepoint.powershell function CreateSPListItems() { $sites = Get-SPSite ) { Write-Warning "There is no site available." CreateS…
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 代码如下(保存到本地ps1文件中,右键run with PowerShell即可): Add-PSSnapin Microsoft.SharePoint.PowerShell function createSPWeb() { $webApps = Get-SPWebApplication chooseWebAppAndSelectSite $webApps } function chooseWe…
通过PowerShell创建SharePoint Site Collection,代码如下: Add-PSSnapin microsoft.sharepoint.powershell function CreateTeamSite() { $webApps = Get-SPWebApplication $webAppsUrl = $webApps.Url ) { Write-Host "You have only one web application:" Write-Host $we…
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ PowerShell是基于.NET的一门脚本语言,对于SharePoint一些日常操作支持的很好.今天上午同事做数据量测试,要在一个site下创建500个list和500个library,在一个list中创建1000个item,这样的需求通过PowerShell脚本实现是非常容易的. 下面是为这项测试写的两个小 Add-PSSnapin Microsoft.SharePoint.PowerShe…
1. 添加解决方案到SharePoint场 Add-SPSolution "c:\newsolution.wsp" 2. 获取场中的解决方案 Get-SPSolution 3. 获取指定的解决方案 $solution = Get-SPSolution -Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd 4. 部署解决方案到Web应用程序 $solution = Get-SPSolution -Identity c0e31dec-294d-4f2…
快速了解Windows PowerShell     从SharePoint 2010开始支持PowerShell,仍支持stsadm.exe工具:     可以调用.NET对象.COM对象.exe文件传参:     控制台执行,批处理执行:     支持管道   书写Windows PowerShell脚本     后缀名:.psl,纯文本文件:     Write-Host "Hello World!"   使用Windows PowerShell集成脚本开发环境(ISE)    …
这几个月一直在帮客户改需求,部署.我已经心力憔悴,经过一段时间的摸索,我对用PowerShell实现自动化部署也有了一些心得,比如说利用PowerShell导出导入AD中的User.在基于SharePoint平台开发时,利用AD来进行人员的管理,一般会建组织单元(OrganizationalUnit)来对用户进行管理.当最终部署到客户的服务器上时,怎样把本地AD中的用户数据同步到服务器上呢,要知道如果手动输入人员是一件麻烦的事.幸运的事,PowerShell可以帮我们解决这个麻烦的问题. 导出A…
STSADM stsadm -o addsolution –filename c:\bin\CustomerSiteSearch.wsp stsadm -o deploysolution –name CustomerSiteSearch.wsp -url http://[ServerName] -allowgacdeployment -force –immediate stsadm -o activatefeature –name customersitesearch_feature1 -url…