Delete All Items from List or Library using PowerShell

At times, we may have to delete all items from SharePoint list or library. We can get it done by going to “Manage Content and Structure” option as in my another article How to Remove All responses from SharePoint Survey There may be situations, where we’ve to delete all items from SharePoint…

Read more

How to Create SQL Server Alias for SharePoint?

In My SQL Server best practices for SharePoint, I wrote a point on SQL Server Alias. Let me elaborate that by going a little deep on configuring SQL alias for SharePoint. Why We need SQL Alias for SharePoint? When installing SharePoint, you’ll be prompted to enter the SQL Server instance and that’s…

Read more

Move Site Collection to a Different Managed Path

Created a Site Collection under wrong Managed Path? Now want to move the site collection to another managed path? Unfortunately there is no way, other than: Backup your source site collection Delete the source site collection Restore the site collection with the desired target URL! There is no other way to change…

Read more

Managed Paths Can’t be used in List/Library/SubSite Names

We can not use Managed paths in SharePoint List or Library. E.g. “Sites” is a built-in Managed path. So you can’t name any list/library/sub-sites as “Sites”. This behavior is in SharePoint 2010 only and Not in MOSS 2007.  But you can use the managed paths in your Site collections. E.g. https://sharepoint.company.com/sites/sites

Read more

Pick the right w3wp.exe to attach among Multiple Worker processes while debugging

When multiple web applications running with multiple application pools, they will create multiple worker processes (W3WP.exe). While debugging code from Visual Studio, we got to pick the one that belongs to the target web application, otherwise, the debugger will not stop on break-points! Don’t forget to select “Show processes from all users”,…

Read more

Create Folders and Sub-Folders in SharePoint Programmatically

How to create Folders in SharePoint? To create a folder in SharePoint list or Library, follow these steps: Navigate to your SharePoint list or library From the “Files” tab on the Ribbon, click on the “New Folder” button Give a name to your new folder and click “Save” What if you don’t…

Read more

Get SPWeb Object from the URL

PowerShell Snap-in for SharePoint 2010 offers Get-SPWeb cmdlet to get SPWeb Object directly from the given web URL. But when writing .Net code in C# (or in PowerShell with MOSS 2007) SharePoint object model doesn’t offer this mechanism. However there is a Trick to get SPWeb Object from given URL: Get the…

Read more

Server error in ‘/’ Application – The Resource cannot be found – Solution

In a SharePoint 2007 environment, called for fixing a issue: All SharePoint sites appeared with an error”SharePoint server error in ‘/’ Application The Resource cannot be found. “ Server Error in ‘/’ Application.The resource cannot be found.Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have…

Read more