Run a Console Application and Mail Output Report with PowerShell

We had a console application GetStorageReport which runs and generates detailed storage reports based on some SharePoint APIs. Got the requirement to run the tool periodically and mail the output report of the application. Scheduled a PowerShell script to execute the application and mail the report to Administration team.

Read more

SharePoint Server: How to Change the Site Collection URL?

How to change the site URL in SharePoint On-Premises? At times, we get requests to change the Site collection URLs. While it’s relatively straightforward and easy to go to Site Actions >> Site Settings >> Title, description, and icon under Look and Feel to change the website’s URL, changing the site collection…

Read more

Change SharePoint 2010 Authentication from Windows to Forms

While creating a web application, by mistake selected “Windows” authentication, and felt we need “Forms” authentication (Claims Based Authentication) because of a business requirement. Went to Central Administration >> Application Management >> Manage Web Applications >> Selected the desired web application >> Authentication Providers. Oops, “Forms” option is disabled! Couldn’t find any…

Read more

How to Install PowerShell ISE in Windows Server 2008 R2?

PowerShell ISE is a wonderful tool for creating, Debugging and executing PowerShell scripts. But it doesn’t get installed automatically. Here is how to install PowerShell ISE in Windows 2008 R2. You don’t have to download anything to get PowerShell ISE in Windows 2008 R2, It’s an Instinct feature but not installed by…

Read more

Trim audit log to Improve Performance in SharePoint

Requirement: Trim Audit log in SharePoint On-Premises. Found SharePoint content databases were growing even when no content was added from the user side. I was analyzing SharePoint Database growth, went ahead and generated a disk space report from SQL Server Management Studio (Right-click the database, choose Reports >> Standard Reports >> Disk…

Read more

How to Set Welcome Page Programmatically in SharePoint?

By default, SharePoint uses “default.aspx” page as the welcome page (or Home page) in SharePoint 2007 and “SitePages/Home.aspx” in SharePoint 2010. It uses Pages/Home.aspx when publishing feature is enabled under MOSS 2007. If you want to change Home Page: SharePoint provides users an interface to set the welcome page once Publishing feature…

Read more

Change All SharePoint Site’s Access Request Emails with PowerShell

Some time back, I posted an article on Configuring Access Requests from SharePoint. Now, To take the control, Business decided to give the access control requests to the SharePoint help desk, instead of site owners. So, the requirement is: Update All SharePoint Site’s access request Emails to: SharePoint Help Desk’s Mail id…

Read more

Iterate through All SharePoint Web Applications, Site Collections, Sub-sites, Lists and List Items Programmatically

Often in development, we may have to iterate through all web applications, Site collections, sites, Lists and List Items to get some job done or generate reports. Here are the code snippets to help. Iterate Through all web applications, Site collections, Sites, Lists and List Items Using C#: Starting the Loop from…

Read more

Find Large SharePoint Lists & Generate Report with PowerShell

Requirement: Find large lists in SharePoint using PowerShell! Large lists are potential threats to SharePoint’s performance. So, I wanted to audit the SharePoint environment to find all large lists which have items more than 2000 and generate a report. PowerShell to Find Large Lists and Generate a Report in SharePoint: PowerShell script…

Read more

Site Collection Locks in SharePoint

Some time back, I ran into an issue where a particular site collection was in read-only mode to everyone including site collection admin, certain options such as the site action menu was in the disabled state!. Then I realized the site collection backup process was interrupted due to the disk-space issue, and…

Read more