Posts

Showing posts with the label Development

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...

Shared JavaScript and CSS in Visual Studio SharePoint Solutions

Image
When you develop SharePoint solutions, especially SandBox solutions or apps, you write lots of code in JavaScript and design pages with CSS. In such cases it is always a good practice to create shared code for common tasks instead of writing repetitive code or copy from old projects.  It is also advisable to attach JQuery or other JavaScript or CSS libraries to your SharePoint Visual Studio solution. The advantage of attaching JQuery or other libraries is that if you update a file at the Master location, it gets updated in all your projects. There is no need to replace files in all projects manually.  Here at kalmstrom.com we always focus on good shared libraries that give fast and reliable development. As we develop standard solutions, we know that if we do it wrong the first time, we will have to go back and fix it later (at our own expense). Thus we need to always do it right from the beginning!  For a Visual Studio solution you can also add an existing fi...