Get ListTemplate and Create New List in PowerShell
A PowerShell related post today: To create a list or library in SharePoint, you can do the following: $web = Get-SPWeb "http://serverUrl" $web.Lists.Add("List Title", "List description", "Template...
View ArticleStart SharePoint Timer Job Script
I’ve written a PowerShell script that starts a SharePoint timer job, which is useful if you do a lot of work that relies on certain timers firing and don’t want to have to keep going into the Central...
View ArticleSPRequest ULS Entries
The SharePoint ULS logs always report objects not being explicitly disposed of, even for some of the SharePoint object model calls, although these are supposedly false positives. Now, not all entries...
View ArticleExport MetaData Terms
Central administration provides a way to import metadata term sets and terms by uploading a CSV file. However, it does not provide a mechanism for exporting terms to a CSV. There are quite a lot of...
View ArticleHide Web Template
In PowerShell, if you want to remove a web template from the New Site dialog for a specific web, take a look at the following script: function Remove-SPWebTemplate { [CmdletBinding()] param(...
View ArticleShow Web Template
Carrying on from my previous post Hide Web Template, this post demonstrates how to show a web template in the New Site dialog for a specific web using a PowerShell script: function Add-SPWebTemplate {...
View ArticleGet 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...
View ArticleCreate 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...
View ArticleImport 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...
View ArticleShrink 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...
View ArticleRestart 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...
View Article