Empty SharePoint Recycle Bins Programmatically with PowerShell

August 30, 2012    , , , , ,
Requirement: Empty recycle bin in SharePoint In a Database attachment method migration project, we decided to clear all the recycle bins to get some additional free space in databases. There were 3000+ site collections. Automation? SharePoint Automation = PowerShell :-) Empty SharePoint S…

Creating Dependent Features in SharePoint

August 21, 2012    ,
In a recent project, had to create a feature which provisions bunch of Lists, Libraries and Pages with custom web parts. Those custom web parts also deployed as feature based solutions. So the requirement is: Activate the features which brings the custom web parts first, and then activate the fe…

Install Features Programmatically in SharePoint

August 16, 2012    , ,
Generally, we use STSADM command line to Install features by STSADM –o installfeature –name FeatureName . or Install-SPFeature PowerShell Cmdlet. At times, we may have to execute stsadm programmatically to install a Feature. Say for e.g. from console applications or from another feature activat…

How to Add Web Parts to the Page Programmatically?

August 04, 2012    , ,
Requirement is to add OOTB and Custom web parts to a web part page programmatically via features. I'm sharing the code snippets: To Add Out Of The Box Web Parts: (E.g. Content Query Web Part, Content Editor, Page Viewer Web Part, etc): SPWeb web = properties.Featur…

Powered by Blogger.