Restore list by name from recyclebin via powershell
2013-07-05 17:57
501 查看
Restore list by name from recyclebin via powershell
############################################### $url : The site url #
#$name : The list name #
#Example : RestoreListByName "http://localhost" "list1" #
##############################################
# Import the Microsoft.SharePoint.PowerShell if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.SharePoint.PowerShell } function RestoreListByName($url, $name) { $spWeb = Get-SPWeb -identity $url $spList = $spWeb.RecycleBin |?{$_.Title -match $name} $spWeb.RecycleBin.Restore($spList.Id) }
相关文章推荐
- restore hadoop primary namenode from secondary namenode checkpoint step by step
- How To Search and Restore files from Site Collection Recycle Bin
- list from linux by dgod
- RAC + DG ORA-01105 ORA-01677 standby file name convert parameters differ from other instance 错误
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)
- Error response from daemon: Conflict. The container name "/mysql" is already in use by container
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)
- Add/Delete ContentType in list via powershell
- Namenode HA自动切换 从Namenode报错Got a command from standby NN - ignoring command:2
- Building OrderBy Lambda Expression from Property Name in C#
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)
- Create/Delete list via powershell
- 92 Examine the output of the query that you executed to list the objects in the recycle bin: SQL> SE
- pip: error: No command by the name pip list
- select * from Employee group by name这样的语法有什么意义?
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)
- RAC + DG ORA-01105 ORA-01677 standby file name convert parameters differ from other instance 错误
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)
- Where Does TDCOMConnection.ServerName List Comes From?
- ubuntu10.10 : 在wubi下用livecd挽救你的文件(restore file from wubi by liveed)