Posts

Showing posts with the label SharePoint2010

Download all File Versions from SharePoint using PowerShell

SharePoint is a great platform for file versioning, and it is not uncommon that organizations wish to see or save all versions of a document or use an earlier version to re-create the document. Here we share a PowerShell script that downloads all versions of all files in a SharePoint document library. You can use the same approach for CSOM(client site object model), JSOM (JavaScript object model) or any other SharePoint object model.  Below is the code with explanations. Please study them before you download the script and change the site URL and document library name to your own. Code description Get the SharePoint site reference. $spSiteURL   =   "http://intranet.contoso.com/sites/jayant/" $spWeb   =   Get-SPWeb   -Identity   $spSiteURL  Get the document library as folder .  Here “Docs” is  the name of the document library ,  and I load it as SharePoint folder. $spDocFolder   =   $spWeb . GetFolde...

Load JavaScript Files in SharePoint

Image
When you are coding SharePoint using JavaScript, you need to load JavaScript files, and SharePoint offers multiple ways to do that. The major methods are to register the file on a page, to always load the file by using the SharePoint CustomAction in Module and to load the file on demand by using the Script on Demand function. This is valid for all SharePoint versions. When a JavaScript file is registered on a page it is only available for that page, and this normally works good.  The problem comes when you are modifying the SharePoint ribbon using CustomAction and your CustomAction requires multiple JavaScript files. Then there are two loading methods available, to always load the files or to load them on demand.   It is not good to always load JavaScript files. It will slow down the entire SharePoint performance, because it loads the JavaScript files on ...