Add Site Collection Administrators Programmatically/PowerShell in SharePoint

SharePoint site collection administrators have Full rights to all sites within a site collection. Primary site collection administrator and Secondary site collection administrator specified in central administration will automatically become site collection admins. Its also possible to add multiple site collection admins for any SharePoint site collection. How to add a site…

Read more

How to Recover Deleted SharePoint Central Admin Site from IIS?

SharePoint Central Administration site got deleted from IIS accidentally! It may happen due to a file system got corruption errors. No worries, We can Re-provision SharePoint Central admin site! Let’s provision a SharePoint central administration site using PowerShell. PowerShell Script to provision SharePoint Central Admin site: Open the “SharePoint 2013 Management Shell”…

Read more

Apply SharePoint Quota Template Changes to Existing Sites

Problem Scenario:  End-users actively started using their “My Sites” and most of their My sites reached the site collection storage quota limit of 100MB! Gradually started receiving many requests to increase storage limits. Initially, My site web application assigned with a “Personal” quota template which offers 100MB of disk space. After a…

Read more

Delete All Document Versions in SharePoint Document Library using PowerShell

Requirement: Delete all old document versions in a SharePoint site collection to free up some disk space occupied by document versions. Because simply disabling versioning does not delete old versions which are already created until the next update happens on the document! So, If you want to release the space occupied by…

Read more

Find the Number of Users Currently Connected to SharePoint Site

Had to perform an unplanned IIS Reset to fix an issue in production SharePoint Farm. But executing IISReset breaks ongoing user sessions and give “Service Unavailable” error message, isn’t it? Wouldn’t it be a good idea to find the No. of users currently connected with the SharePoint site and do the IISReset…

Read more

How to Connect to a Specific Web Front End Server in SharePoint Farm?

A typical SharePoint farm may contain more than one web front-end server – load balanced. When you hit the SharePoint site URL, say: https://portal.crescent.com, it hits the load balancer first. Load balancer decides to which web front end server this request needs to be transferred based on server load and other load…

Read more

Create a Scheduled Task to Run PowerShell Script with Windows Task Scheduler

Requirement: Schedule PowerShell Script in Windows Task Scheduler. PowerShell is really a game-changer to automate repetitive or time-consuming processes, isn’t it? We have a PowerShell script to generate a report on SharePoint content databases size growth – Storage Report, We used to run it on the first day of every month on…

Read more

Hide Links in Site Settings Page with HideCustomAction

Problem: People make SharePoint branding inconsistent by creating and applying random themes and breaks corporate branding. So need to stop users from creating & uploading new themes and applying them. How to Hide Links in Site Settings page using CustomAction? Hide Themes and Site Themes links with “HideCustomAction” from Site Settings! Some…

Read more

Change Site Collection Primary, Secondary Administrators in SharePoint

Site collection administrators have god-like power within a SharePoint site collection, They can add/delete sites, content, users, etc for any site within a site collection. These administrators are responsible for administering their site collection and are recipients of any site status and resourcing Email notifications. How to change the site collection administrator…

Read more

Drive Space Monitoring using PowerShell Script

In SharePoint servers monitoring disk space is a common administrator task. Because, SharePoint servers may run out of disk space from SharePoint, IIS Logs, SQL Server transaction logs, or even from SharePoint content (If you don’t have Quotas enabled!) There are a lot of first-party, third-party utilities available, such as SCOM to…

Read more