Delete multiple document libraries in SharePoint 2013
We currently have 2000+ site collections where I would like to delete the default "Documents" library.
I know how to do this manually for one site collection and it works fine when I use this:
$web = get-spweb -Identity http://intranet/linktoasite
$list = $web.lists["Documents"]
$list.AllowDeletion = $true
$list.Update()
$list.Delete()
However doing this for 2000+ sites isn't really efficient and my attempts to do this in PowerShell based on a CSV file with all site collections have been ...uhm... less than successful. ;)
Any help pushing me in the right direction are highly appreciated! :-)
You just need for loop at site collection level
http://sharepoint.stackexchange.com/questions/65459/powershell-script-to-iterate-all-site-collections-and-set-another-quota-template
$SPWebApp = Get-SPWebApplication http://portal
foreach ($SPSite in $SPWebApp.Sites)
if ($SPSite -ne $null)
Set-SPSite -Identity $SPSite.url -MaxSize 4000000 -WarningSize 2000000
$SPSite.Dispose()
http://sharepoint.stackexchange.com/questions/60002/powershell-enumerate-through-all-site-collections-but-not-include-one-specific-s
$spsites = Get-SPSite -Filter { $_.Url -ne "http://mysite.com" }
If this helped you resolve your issue, please mark it Answered
Similar Messages
-
Can't see 'Upload Multiple Document' option in sharepoint 2013
After upgrading Sharepoint 2010 to 2013, i can't see 'Upload Multiple Document' option under files tab. I have downloaded and place the file 'STSUPLD.DLL' into Office14 and Office15 folder but IE is not asking me to run any microsoft ActiveX control as mentioned here
http://thuansoldier.net/?p=2289
I am using Office 2010 with IE9 (32 bit) .
Am i missing anything ?Hi,
According to your post, my understanding is that you could not see the “Upload Multiple Document” option in SharePoint 2013.
In SharePoint 2013 the “Upload Multiple” Options has been depreciated. As we all known, there are two alternative ways to Upload multiple documents:option
1 - Using the drag-and-drop functionality, option 2 - Windows Explorer view.
You can upgrade your IE from IE9 to IE10 then check whether it works.
You can also use the Windows Explorer view to upload multiple documents.
You will probably get the following error.
To resolve this add the SharePoint site as Trusted in your Browser and Make sure that the WebClient service is running. To do this, follow these steps:
Click Start, click Run, type services.msc, and then press Enter.
In the list of services, locate the WebClient service, and then make sure that its status in the Status column is set to Started. If its status is not set to Started, double-click WebClient, click Start, and then click OK.
Once done restart the browser and try opening the Windows Explorer again. In the Windows Explorer you can copy and paste Multiple documents as done in earlier SharePoint versions.
For more information:
http://www.learningsharepoint.com/2012/11/29/how-to-upload-multiple-documents-in-sharepoint-2013/
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Ellipse not working in few document libraries in SharePoint 2013
I have few document libraries with 500+ documents.
I am not able to edit the properties using ellipse.
I tried on all browsers and on all version.
It is working for other document librariesHi,
According to your post, my understanding is that you got an error when click on ellipsis then "Edit Properties" in a Document library.
I tried to reproduce the issue, every documents in my environment worked well.
As you has said that It is working for other document libraries, you can create a new document library with the same "parameters" and then transfer
the documents into it, then check whether it works, maybe the current library has been corrupted.
You can also check the ULS log to see if anything unexpected occurred.
For SharePoint 2013, by default, ULS log is at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
Besides, here are two similar posts, you can use as a reference:
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1c38e04c-ffc7-462e-a3ed-b6c23ccdfca7/sharepoint-2013-getting-an-error-while-clicking-on-the-ellipsis-of-a-document-in-a-document?forum=sharepointgeneral
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/5e720e93-d0b8-4c4b-8f20-a81df9a79d5c/error-when-clicking-on-elipsis-of-document?forum=sharepointgeneral
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
Display data from multiple document Libraries in List View Webpart
Hi All,
I want to display data from multiple document libraries into one list view webpart(custom i have created)
I went through the following link http://blogs.msdn.com/b/ramg/archive/2009/04/22/implementing-a-simple-cross-site-collection-list-view-webpart.aspx
but it tells to display only from one document library.
My motive behind displaying data in the list view webpart is to achieve the functionality of Check In ,Check Out and other OOB features.
With Regards,
Jaskaran SinghHi,
As there is no such OOTB feature, a workaround is to create a visual web part to gather items from libraries and implement functionalities like Check in, Check out files
in different libraries.
The links below will provide more details:
Create Visual Web Parts in SharePoint
2010
A demo about displaying list items in visual web part:
http://www.dotnetcodesg.com/Article/UploadFile/2/217/Web%20Part%20in%20SharePoint%20To%20Show%20All%20List%20and%20List%20Items.aspx
About the Check In and Check Out:
How to Check In a document programmatically
SPFile.CheckIn method
and SPFile.CheckOut method
Best regards
Patrick Liang
TechNet Community Support -
Unable to edit document template in SharePoint 2013
We have uploaded a set of templates that users can select from the drop down list in the Document field in the Document Library. We now need to edit one of these document templates.
We follow the procedure and make the edits which changes the template but when we then select that template from the drop down list, the edits have not been actioned.
Can anyone please assist?Hi,
As I understand, The modification was not saved back to the template.
How do you edit the document template?
Check if the URL of the template is right. You can go to the site setting->site content type->click the content type you want to edit->advanced setting->edit the template->open the template, and click file->to check if the URL under the template is right.
As a workaround, when you edit the template you can save the template in the local computer, and you can upload the template you have saved in the advanced setting for the content type.
The article below is about how to create Document Templates for Document Libraries in SharePoint 2010, it also can work in SharePoint 2013.
http://blog.henryong.com/2007/02/12/how-to-create-document-templates-for-document-libraries/
Best regards,
Sara Fan
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
ID in Document library in SharePoint 2013
Hi,
I have an document library in SharePoint 2013.I uploaded some documents to document library for testing.Now I deleted these testing documents.And when user starts adding documents,the id of the document is not started from 1.
So how I will get the id starting from 1.
Any help?
Thank you.Save the list as a template and recreate the list usign this template. ID columns will always keep incrementing
and will never be reused. -
Hi,
The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
below my code. I am using Content editor web part and attached my JS file with that :-
<div>
<label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
<input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
</div>
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
<script type="text/javascript">
SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
// This function is called on click of the “Create Document Set” button.
var ctx;
var parentFolder;
var newDocSetName;
var docsetContentType;
function CreateDocumentSet() {
alert("In ClientContext");
var ctx = SP.ClientContext.get_current();
newDocSetName = $('#txtGetDocumentSetName').val();
var docSetContentTypeID = "0x0120D520";
alert("docSetContentTypeID:=" + docSetContentTypeID);
var web = ctx.get_web();
var list = web.get_lists().getByTitle('Current Documents');
ctx.load(list);
alert("List Loaded !!");
parentFolder = list.get_rootFolder();
ctx.load(parentFolder);
docsetContentType = web.get_contentTypes().getById(docSetContentTypeID);
ctx.load(docsetContentType);
alert("docsetContentType Loaded !!");
ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
function onRequestSuccess() {
alert("In Success");
SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
alert('Document Set creation successful');
// This function runs if the executeQueryAsync call fails.
function onRequestFail(sender, args) {
alert("Document Set creation failed" + + args.get_message());
Please help !!
Vipul JainHello,
I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
Value cannot be null.Parameter name: context"...
Also, I tried removing SP.SOD.executeFunc
from my code, but no success :(
Kindly suggest !!!
Vipul Jain -
Need to delete multiple documents at the same time from micro soft word
I am trying to delete multiple documents at one time from my word ??
one way would be to click on "documents" in the sidebar of finder. Select multiple documents by holding the shify key while you click and drag them to the trash.
-
Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0
Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0
Please help!!I dont think you can do this, because you have to name/url of the web application in realm. You have to add new realm for each web application.here is script to add another realm.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$sts = Get-SPTrustedIdentityTokenIssuer | where {$_.Name -eq "ADFS2.0"}
$uri = new-object System.Uri("http://url/")
$sts.ProviderRealms.Add($uri, "urn:sharepoint:Name")
$sts.Update();
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
Multiple file upload in SharePoint 2013 using AjaxFileUpload
Hi all,
I want to add multiple files using file upload control in our visual web part SharePoint 2013. I tried to use AjaxFileUpload (from Ajaxcontrol toolkit) in my visual web part and also added the handler in web.config as described in article (http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx).
But, it’s not even opening the browse dialog box.
I also tried to see if any third party control is available to achieve multiple file upload in SharePoint 2013 Visual web part, but without any success.
Please help.
Regards,
MonicaHi
Try to add the dll files of Ajax Control Toolkit in the
Bin folder of your SharePoint Web Application (IIS Site)
Hope that help
Ahmed Naji SharePoint Geek
MCP|MCTS|MCPD
My English SharePoint Blog | DotnetFinder My Arabic SharePoint Blog|
CodeReloaded
My Gallery Contributions
SharePoint 2010 Twitter Web Part
SharePoint 2010 Custom Timer Job -
Document Preview in SharePoint 2013 without office webapps
Hi,
A friend of mine was asking if there is an option OOB or any third party which would provide the option to preview the document in the document library without Office webapps, (His client has SharePoint 2013)
Any suggestions are appreciated....!
Satyam...The same question posted here - go through the thread
http://social.technet.microsoft.com/Forums/sharepoint/en-US/38794517-2eeb-46df-b781-77e634c69b1b/third-party-tool-for-document-preview-in-sharepoint-2013?forum=sharepointadmin#a0310766-399b-4f66-a762-e6394b1770e0
Regards,
Pratik Vyas | SharePoint Consultant |
http://sharepointpratik.blogspot.com
Posting is provided AS IS with no warranties, and confers no rights
Please remember to click Mark As Answer if a post solves your problem or
Vote As Helpful if it was useful. -
Is there a difference between libraries and document folders in Sharepoint 2013?
I am new to Sharepoint and trying to decide if I should use "documents" folders or "library" folders. As far as I can tell, there is no difference. Am I missing something?
Hi,
Use Document library if you need to hold all your documents. and you can create folder inside library also.
Please read this http://office.microsoft.com/en-in/word-help/sharepoint-document-libraries-i-introduction-to-sharing-files-RZ010234528.aspx?section=3
Please remember to click 'Mark as Answer' on the answer if it helps you -
How do I delete duplicate Site Columns in Sharepoint 2013
When I got to save a site as a template I'm told that there are duplicate site columns and the template can not be saved.
I found that under all of the e-mail submission site columns they are duplicated site columns for example
BCC
Multiple lines of text
Property Management
BCC
Multiple lines of text
PMRG Connections
I want to remove the Property Management ( I know that this is the site name where I copied it from), but they are duplicated all across the site collections.. every site and site collection has it duplicated, is this because I
enabled lists to allow email submissions?
either way I need to get rid of the duplicate item, so I can save sites as templates if needed.There are a few required columns that can’t be deleted. They cannot be deleted through UI because
the Delete button is not available (as you already mentioned in your previous post). The only available option is using C# code (SP object) or Powershell commends.
By the way, I cannot find Date Received column in my Dev, I guess Date Received is the one of the columns added by custom feature. You may refer the link below for useful Powershell commend. It was written for SharePoint 2010 but should work in
SharePoint 2013 as well.
http://get-spscripts.com/2010/10/cant-remove-site-column-from-content.html
백상하 - Stop hacking my blog http://blog.naver.com/agilepoint
쉐어포인트 배움터 http://sharepointkorea.com -
I have an Access 2013 Web App in my Sharepoint 2013 online website. It contains a query to report on its data (several, actually, but let's keep it simple). I want to connect an Excel spreadsheet to the query, visualise the data in pivot tables/graphs/whatever,
save the spreadsheet in a Document Library, and let other team site Sharepoint users open the spreadsheet (preferably in Excel online, but with Excel client if it has to be) and see/copy the data, refreshed with the latest information from the Access Web App.
Simple, surely!
The way I'm doing it at the moment is to create an ODC file to connect to the cloud-based Access 2013 database, save that ODC in a Data Connection Library in the SP site, and use the saved ODC file as data source in the Excel spreadsheet. This works and
successfully keeps everything 'in the cloud' but I can't get it to refresh in Excel Online, and if I open the spreadsheet in Excel Client I have to enter the database password every time to refresh it. I don't really want to issue this password to everyone
who might want to view the data. There must be a better way than this ODC method, I suspect.
Googlings on this have led down various blind alleys - Excel Services, PowerPivots, Web Parts - but I'm stuck on which to follow through. Please, someone, point me to an article/book/website that explains how to do this step-by-step in simple language..
thanks
JonathanI don't see any quick way of achieving it - at least there's no such functionality exists in SharePoint. All you can do, develop an event receiver that will update the fields in the list item once the excel file is added/updated. You can use OpenXml API
to manipulate the excel file.
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com -
How do I delete multiple documents at the same time
How do I delete several or multiple documents at the same time. Do I have to delete each one individully?
You can select multiple adjacent files or folders by clicking on the first one then shift-click on the last one. Multiple non-adjacent files or folders can be selected one at a time by command clicking on each one. Click on any selected file or folder then drag/drop to trash.
Maybe you are looking for
-
Christmas present a new ipad. Refurbished. I am not sure what the stats are. All I do know is I sure could use some help and would be very appricative of it.
-
Making a telephone directory in InDesign 5.5
I am trying to make a telephone directory for the entire campus. I have all faculty/staff in a spread sheet, saved it as a csv file. I then put it InDesign - put the appropriate fields then tried to do multiple layouts and I am realizing it doesn't "
-
Parse xml in inputstreamobject and decode base64
Hello I have got a http-package with content-type text/xml, from a HttpURLConnection object. From the HttpURLConnection object i get an InputStreamObject. Now i'm looking for the easiest to parse the xml, that is in the Inputstream object. The xml ju
-
SQL*Loader- Records Rejected - Error on table ORA-01722: invalid number
Getting the following errors : Please tell me where I am going wrong? Attached is the log file and snippets of datafile along with the control file !! Also please direct me how can i upload 4900 records at one go? SQL*Loader: Release 11.1.0.7.0 - Pro
-
Vista Home Premium SP1 x64 & Photoshop Elements ?
Hi all, Does any one know if there are any plans in the works to make Photoshop Elements compatible, and take full advntage of 64 bit technology both in Vista and XP? Sure would be nice to take advantage of that 8GB of memory I have. Thanks, John