Create a SharePoint Subsite from Custom Site Template using PowerShell

Requirement: We have a PMO site template created for managing projects in SharePoint. Had a new requirement to create some 20+ new PMO subsites based on the custom site template. To create a site based on site template, you can pick the custom tab and then select appropriate site template from the…

Read more

Download All Attachments from SharePoint List Items using PowerShell

Requirement: Download all attachments from a SharePoint list to local folder. Lets use PowerShell to download attachments from all SharePoint list items. PowerShell to Download Attachments from SharePoint List: For C# version of the above code, Go to: Download Attachments from SharePoint List Programmatically

Read more

Find All Users Who Accessed SharePoint Sites in the Past One Year

Requirement: Get the E-mail ids of all users who accessed SharePoint sites during the past one year! Solution: Lets use Log Parser and PowerShell to fulfill this requirement. Here is how: Locate your SharePoint web application’s log folders from all web front servers (usually: C:\WINDOWS\system32\LogFiles\W3SVCxxxxxxxxx\”) using IIS. Make a note of them….

Read more

SharePoint 2013 deployment – Project Plan Template with Milestones

Assuming Hardware, Public IP, SSL Certificates, Domain Names are ready – Here is my SharePoint 2013 deployment project plan template with milestones outlined: Deployment Tasks 0. Project Kick-off, Team-setup, Identifying key stakeholders and Responsibilities 1.Pre-Deployment Activities 1.1 Planning Logical Architecture, Topology, Service Accounts, Domain URLs, Naming Standards, etc 1.2 Provision Service Accounts,…

Read more

SharePoint Products Configuration Wizard Failed to Connect to the Database Server.

Problem: SharePoint sites crashed suddenly! Found event id 5586 “The target principal name is incorrect. Cannot generate SSPI context.” logged in SharePoint servers. Tried running SharePoint 2013 Products configuration wizard. Received error message:“Failed to connect to the database server. Ensure the database server exists, is a SQL server, and that your have…

Read more

Enable Item-Level Permissions on Document Library in SharePoint using PowerShell

Requirement: Enable item level permissions in SharePoint document library. SharePoint Lists provide item level security options such as “Read items that were created by the user” or “Create items and edit items that were created by the user” under “Advanced Settings” page in SharePoint list settings. But you don’t get these options…

Read more

Fix for PowerShell Script cannot be loaded because running scripts is disabled on this system error

Problem: Getting “cannot be loaded because running scripts is disabled on this system” error! On trying to run a PowerShell script from the PowerShell console, received this error message: “File C:\temp\GenerateRpt.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.” Root Cause: This…

Read more

Update “Created By”, “Last Modified” Metadata Fields of a List Item using PowerShell

Ever wanted to update the SharePoint list or library item’s metadata fields such as: “Created By” “Modified By” “Created” “Last Modified”? These column values must be updated while copying items from one list to another, programmatically. Today, Had another requirement to update metadata fields in a document stored in the SharePoint document…

Read more