Tag Archives: PowerShell

Restart Services Script

Looking for a PowerShell script to restart important services across a SharePoint farm? Look no further because all you need is here 🙂 The script below, initiated by calling the Restart-Services function, restarts the following services on all SharePoint servers … Continue reading

Posted in SharePoint | Tagged , | Leave a comment

Shrink CrawlStore Database

A useful script for running on your dev\uat environments to free valuable disk space. The crawl store database can grow quite significantly over time. First of all, the PowerShell script: # Load the SharePoint assembly – change the version to … Continue reading

Posted in SharePoint, SQL | Tagged , , | Leave a comment

Import Tag MSBuild Errors

Creating a SharePoint package is easy enough with Visual Studio but each time you restart it, the package location used previously is replaced with the default location of the current user’s Documents folder. To save a few seconds from my … Continue reading

Posted in Visual Studio | Tagged , | 1 Comment

Create Site Collection with Content Database

A PowerShell related post today. If you need to create a new site collection and ensure it uses a specific content database, this little script will get that done for you. No messing about in Central Administration disabling content databases … Continue reading

Posted in SharePoint | Tagged , | Leave a comment

Get SearchServiceApplication in PowerShell

In C# when retrieving the default SearchServiceApplication object you might do something like the following, if you were trying to initiate a new Schema object, for example: SPServiceContext serviceContext = SPServiceContext.GetContext(SPContext.Current.Site);   SearchServiceApplicationProxy searchApplicationProxy = serviceContext.GetDefaultProxy(typeof(SearchServiceApplicationProxy)) as SearchServiceApplicationProxy;   Guid … Continue reading

Posted in SharePoint | Tagged , , | Leave a comment