Hot answers tagged

19

Have you tried using the "recycle" command using the REST API? (not using HTTP DELETE) Endpoint URI structure: http://<sitecollection>/<site>/_api/web/lists(listid)/items(itemid)/recycle() Please refer to the documentation regarding recycle on MSDN: http://msdn.microsoft.com/en-us/library/jj247053.aspx


15

I hate answering my owner questions here but found the problem. There's a flag on lists you can set a list to AllowDelete or not (this is for lists that are critical to the operation of a feature). The flag on these lists were set to False and wouldn't allow deletion. It still doesn't explain why the list was showing up twice both in the UI and SharePoint ...


14

The link is hidden, and you'd have to type (copy paste it) to reach the delete site option. Navigate to _layouts/15/deleteweb.aspx in the site you want to delete (as owner). In your case it would be https://<domain>.sharepoint.com/sites/RobTest/_layouts/15/deleteweb.aspx


10

I took a stab at converting Servy's answer into PowerShell. Seems to work for me, but would be interested in any feedback. [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") [System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, ...


10

Deleted subsites not going in Recycle Bin They are there, but You should find them with this path: http://server/_layouts/15/AdminRecycleBin.aspx?View=2 ...or view=13 for he case of SharePoint Online


10

It's a normal behavior with the recurrence events when you try to edit a specific one event in the Event series ! So you should be aware of the following : If the file attached for a specific event level . you can get the delete link for only the related files that attached directly for this event when editing this specific event. If the file attached for ...


9

The approach of deleting the list and recreating the list is the fastest & most efficient (since you are deleting all the list items) - Get-SPWeb $FooUrl | % { $_.Lists.Delete([System.Guid]$_.Lists["FooList"].ID) } The above deletes the list and you can then recreate the list with its template, etc.


8

Create a custom permission level based on Contribute that does NOT have the Delete Items option selected. Apply this permission level to the list for the desired users. See this article for full details, http://mssharepointtips.com/tip.asp?id=1019, the screenshots are from 2007 but the premise is exactly the same in 2010.


8

This was the same issue with me. The Central Administration displayed the site in the sites list, but without any reference to the Content Database where it should have been created. No way to remove it using the web interface (all pages displaying information about the site had no content at all). Then i thought to clean it up and remove via script. A ...


7

First try this set of commands: $web = Get-SPWeb http://web-url $list = $web.Lists["Documents"] $list.AllowDeletion = $True $list.Update() and then $web = Get-SPWeb http://web-url $custom = $web.lists["Documents"] $custom.Delete()


6

I've found a post on msdn that explains the request limits on the bottom of the page. http://msdn.microsoft.com/en-us/library/office/jj163082.aspx SharePoint has a 2 MB limit for an operations request, and a 50 MB limit for the size of a submitted binary object. The request size is limited to protect the server from excessively long queues of ...


6

I have very similar code with one code difference and mine is pretty fast. Change $collListItems.Delete($intIndex); to $collListItems[$intIndex].Delete() I think adding ; at the end of each line is optional in PS.


6

This seems to be an issue with the powersheel_ise.exe and once I close and reopen it, it seems to be fine. Here's a link I found.


6

I recently ran into the exact same issue in SP 2013 where my Dev machine had the RTM install and the target server the June CU. We ended up copying the Content Database from SQL directly, reattaching and associating it to a Web Application and it worked flawlessly. It seems the Restore command is no longer backwards compatible and can't be relied to restore ...


6

To list them, this actually gives you all sites under the path though: Get-SPSite "http://awesome.com/workspaces*" -Limit ALL To delete you should be able to use Get-SPSite "http://awesome.com/workspaces*" -Limit ALL | Remove-SPSite -Confirm:$false You can use Remove-SPContentDatabase -Identity {GUID} to remove a content database


5

I believe it depends upon which SharePoint version you are using. Your question tells me that you might be using SharePoint 2007, since you emphasise on the 2000 items limit. This limit in the list is just for retrieving the items in a single view, but you can have millions of items as long as you don't display more than 2000 items in a single view. You can ...


5

$eventReceiversToDelete = $list.EventReceivers | group-object assembly, class, type | #Groups event receiver by assembly/class/type ? { $_.Count -gt 1 } | #If any of assembly/class/type pairs are encountered more than once, we have a duplicate % { $_.Group[1..100] } #enumerate starting from second item (indexed at 1), so we don't delete ...


5

Just remove it from the Recycle Bin. SharePoint will issue the command to SQL Server to delete the contents in one go, so it might run slow for a bit (so do it at night), and your Transaction Logs will probably balloon in size, so do a DB backup and free up the free space on your content database once done.


5

If I am not wrong, I think $listItems[$x].Recycle() deletes the list item and puts it in the recycle bin whereas $listItems[$x].Delete() deletes the item permanently. Moreover, I think you should use Batch Delete i.e. SPWeb.ProcessBatchData() to make deletion faster. This example shows how you can do batch deletion in a list/library: http://sharepointnadeem....


5

So let's go with your first request. You want a piece of code to run when a list item is deleted from a list but it has to be 100% javascript and there can't be any page postbacks. Obviously we must assume the page is going to stay open the entire time. You are left with using web services or CSOM to achieve this. My recommendation would be to use ...


5

When you create a new web application, the content database associated with it is fresh in the sense that you haven't added any data to it yet. The purpose of upgrading from SP 2010 to SP 2013 is to carry over the content from SP 2010 to SP 2013. So you delete the original content database as you don't need it and attach the content database from SP 2010 to ...


5

A WebDeleting event can be used to prevent users event if they are owners to delete a site collection. Example: public override void WebDeleting(SPWebEventProperties properties) { properties.Status = SPEventReceiverStatus.CancelWithError; properties.ErrorMessage = "This site cannot be deleted."; properties.Cancel = true; } See this for more ...


5

If you examine the item using PowerShell you can get a better idea of what is going on. In all the cases where I have seen it the lock expires after short period(20 minutes) and has been caused by word setting a lock when a user has selected to edit the file: $web = Get-SpWeb http://somesite.net $item = $web.GetListItem("/relative/url/to/item.doc") $item....


4

Deleting items one at a time is quite inefficient. You're best bet, if it's a feasible option, is to just delete the entire list and re-create it. You can save it as a template first so that all of the column metadata will be maintained. The downside here is that you get a new GUID for the list, so references to the list by GUID (i.e. workflows, alerts, ...


4

Here is an example in C# var web = SPContext.Current.Web; var links = web.Lists.TryGetList("Links"); if (links != null) { links.AllowDeletion = true; links.Update(); web.Lists.Delete(links.ID); web.Update(); } See why to use web.Lists.Delete()


4

First thing, you make sure you are recording the Deletion in your audit log. you can check here Configure audit settings for a site collection Now following events available for audit log reports The following events are available for audit log reports to help you determine who is taking what actions with the content of a site collection: Opened and ...


4

Maybe you have deleted the site before, and it's lurking around in a dark place? Try this and see what you get... Get-SPDeletedSite & Remove-SPDeletedSite You may already have restored this site before. In that process you also deleted the site first (automatically), which you can find running the command... >Get-SPDeletedSite You'll see the site (...


4

The content type was added to the available content types for your Pages Library. Go to Pages > Library ribbon > Library settings > Content types section. Click on the content type name there and then delete. That will remove it from the Pages library. Then you can go into Site Settings > Content Types and delete it there.


4

You can add these lines of CSS using a content editor webpart to hide the delete button. /* For Dispform.aspx */ a[id="Ribbon.ListForm.Display.Manage.DeleteItem-Medium"] { display:none; } /* For Editform.aspx */ a[id="Ribbon.ListForm.Edit.Actions.DeleteItem-Large"] { display:none; }


4

Are you able to use a 2010 workflow in your environment? I ran into this issue a while back, and found that for some reason a 2010 workflow sends it to the recycle bin, but a 2013 permanently deletes it!


Only top voted, non community-wiki answers of a minimum length are eligible