Solutions

SharePoint PowerShell script to cleanup all recycle bins in a site collection

This PowerShell script will take a site collection URL as input and will then iterate through each sub web in the site collection, clearing it's recycle bin before finally clearing the site collection recycle bin at the end.

This script is very useful if you're moving site collections around after mass item activity, such as migrations. Running this script against your site collection will cleanup space in the database so it can be de-bloated from it's post migration state.

Example usage:

Delete-Site-Recycle-Bin.ps1(http://MySharePointSiteCollectionURL)

Download from Microsoft TechNet

DOWNLOAD

Verified on the following platforms

Windows Server 2012 No
Windows Server 2008 R2 Yes
Windows Server 2008 Yes
Windows Server 2003 No
Windows 8 No
Windows 7 No
Windows Vista No
Windows XP No
Windows 2000 No

This script is tested on these platforms by the author.



Script to create a scaled SharePoint Search Service application with redundancy

This script is intended to help automate the construction of Search services. It will create a new SharePoint Search Service Application based on the Configuration Settings section or any run time settings supplied by the user at execution time. The script can be automated for zero user interaction by changing the $useUI setting to $false. In such a case, the script will use the values from the Configuration Settings section for the creation of the service application. Both Crawl servers and Query servers can be scaled to multiple servers by simply adding to the array or following the prompts at run time. As an additional side benefit, the Search databases will NOT have the ugly GUID values in their names.

Download from Microsoft TechNet

DOWNLOAD

Verified on the following platforms

Windows Server 2012 Yes
Windows Server 2008 R2 Yes
Windows Server 2008 Yes
Windows Server 2003 No
Windows 8 No
Windows 7 No
Windows Vista No
Windows XP No
Windows 2000 No

This script is tested on these platforms by the author.



Reset SharePoint lists to inherit permissions from the parent site

Every once in a while, you have the need to reset SharePoint lists with custom permissions, to inherit permissions from the parent site instead.  This is especially useful during migration efforts from DocuShare or eRoom.  Though this can be done via the UI, it can be very cumbersome.  That's where this script comes into play.  It automates the process for you.

Arguments:

  1. URL - The site collection URL to target.
  2. List Title - The name of the list you wish to target.
  3. -all - The script will stop processing once it finds a list that matches.  If you are trying to process all lists by the same name e.g. "Shared Documents" you can add the -all switch to have it process the entire site collection and reset all matching lists.

Download from Microsoft TechNet

DOWNLOAD

Verified on the following platforms

Windows Server 2012 No
Windows Server 2008 R2 Yes
Windows Server 2008 Yes
Windows Server 2003 No
Windows 8 No
Windows 7 No
Windows Vista No
Windows XP No
Windows 2000 No

This script is tested on these platforms by the author.



SharePoint Powershell script to auto configure the Object Cache user accounts.

FEATURES:

  1. Automatically configure SuperUser and SuperReader accounts on farm web apps.
  2. Automatically configures all web apps in the farm.
  3. Automatically handles both Claims Auth and Classic Auth web apps.

Per TechNet, "The object cache stores properties about items in Microsoft SharePoint Server 2010. Items in this cache are used by the publishing feature when it renders Web pages. The goals of the object cache are to reduce the load on the computer on which SQL Server is running, and to improve request latency and throughput. The object cache makes its queries as one of two out-of-box user accounts: the Portal Super User and the Portal Super Reader. These user accounts must be properly configured to ensure that the object cache works correctly. The Portal Super User account must be an account that has Full Control access to the Web application. The Portal Super Reader account must be an account that has Full Read access to the Web application."

These accounts are not configured for you during standard installs and once you have multiple web applications in your environment, the process of setting the SuperUser and SuperReader accounts become more cumbersome.

NO MORE!!!

This script will itterate your entire farm and configure both the SuperUser and SuperReader accounts on each web application in the farm.  Additionally, it caters to either Claim Auth or Classic Auth (AD).

Download from Microsoft TechNet

DOWNLOAD

Verified on the following platforms

Windows Server 2012 Yes
Windows Server 2008 R2 Yes
Windows Server 2008 No
Windows Server 2003 No
Windows 8 No
Windows 7 No
Windows Vista No
Windows XP No
Windows 2000 No

This script is tested on these platforms by the author.





Cheers
C




image

Latest Posts

[catlist name="blog" numberposts=2]