All posts tagged: SharePoint 2010

Blocking SharePoint 2010 installs on unauthorized computers

SharePoint 2010 provides the ability to lock down, track, and even block random installations of Microsoft SharePoint Server 2010. The SharePoint 2010 setup wizard is designed to check for a registry key on the local system and block the install. If you want to block unauthorized SharePoint 2010 installs in your organization, you can setup the following registry key on all unauthorized computers. HKLM\Software\Policies\Microsoft\Shared Tools\Web Server Extensions\14.0\ SharePoint\DisableInstall (DWORD): 1  This will ensure that setup.exe is blocked on the computer. You can use domain group policy to add this registry setting to all computers. If you want to do this using PowerShell, you will require Group Policy PowerShell cmdlets. The following steps will show you how to do that. 

The above commands will first import the Group Policy cmdlets and then use Set-GPRegistryValue cmdlet to include the new registry setting. Since we changed the default domain policy iteself, it will now apply to all the systems in the domain. Once this setting is applied, if you try to run SharePoint 2010 setup.exe, you will see a message as shown here. Now, there …

Install and configure iFilters for SharePoint 2010 using PowerShell & updated PS SP2010 Utils

This is one of the recent additions to my SharePoint 2010 PowerShell scripts & Utilities project on Codeplex. I wrote a generic script cmdlet to take care of iFilter MSI install, make changes to DOCICON.XML, and add the crawl extension to the search service application. This could be useful to those who perform frequent SharePoint 2010 farm configuration. You can copy just this script @ http://pssp2010utils.codeplex.com/SourceControl/changeset/view/14b6c2e1b6ec#SPInstallUtils.psm1 This script requires to be run at the SharePoint 2010 management shell since there is a dependency on New-SPEnterpriseSearchCrawlExtension cmdlet. Whatever iFilters I’d Installed so far were all MSI with silent install support. So, making this a generic script cmdlet was a choice for me.

You can find the complete documentation of PSSP2010Utils @ http://pssp2010utils.codeplex.com/documentation

Managing SharePoint 2010 search service application file types

This post is a result of annoying UI vs CLI differences in SharePoint 2010. The central administration indicates that you specify “file types” to include in the content index. These file types are nothing but the file extensions such as PDF, DWG, etc. You generally add these file types when you install additional iFilters for indexing your SharePoint content. So, when I wanted to add the file types using PowerShell, I started looking around for a cmdlet to do that. However, you will keep searching the for cmdlets if you did not know that these “file types” are called crawl extensions in PowerShell. Yes, that is the annoying design I was referring to. Like I mentioned in an earlier post, it really feels like two different product teams worked on the management interfaces and they never spoke to each other..! Now, coming to the subject of this post, you can add file types crawl extensions by using New-SPEnterpriseSearchCrawlExtension cmdlet.

The above command will add “dwg” to the crawl extensions list. To see a list of all crawl extensions, …

On-demand import of SharePoint 2010 cmdlets within PowerShell ISE

I did not plan to write this post but a few blog posts around using SharePoint 2010 cmdlets within PowerShell ISE made me put my thoughts in to this. Last month, I published a post around using module-sets in PowerShell ISE. The idea was simple. We add a menu item to ISE addons menu and then on select of that menu item, we load a bunch of related modules for a specific task. The same thing can be done in case of SharePoint 2010 cmdlets too. This post suggests that you load SharePonit 2010 cmdlets using PowerShell profile. I would certainly do this with other “light-weight” modules but not with SharePoint 2010 snap-in. This, essentially, because this snap-in usually takes a long time (more than 7-8 secs) to load. This can be frustrating at times. I prefer loading this snap-in only when I need to those cmdlets. The method I mentioned to add addon menu item in an earlier post requires either PSISECream or ISEMenu modules. So, for those who don’t prefer using these modules, …

Announcing SharePoint 2010 PowerShell scripts & utilities codeplex project

I created this project — SharePoint 2010 PowerShell scripts & utilities, on codeplex last week to start sharing all the miscellaneous scripts I have been using throughout my SharePoint 2010 learning cycle. Most of these scripts require quite a bit of rework as they were never meant for sharing with outside world :). I am in the process of doing that and I will post each of those scripts as different modules under different categories. To start with, I am releasing SharePoint install utilities today. This module has only two cmdlets, at present. I will add remaining as time permits. SharePoint 2010 install utilities – SPinstallUtils.psm1 There are a couple of good SharePoint 2010 install automation modules (AutoSPInstaller by @brianlala & SPModule by Zach @ microsoft) already. This module is nowhere close to what they did. But this is just based on the Keep It Simple Stupid (KISS) principle. I have been using this ever since the first beta was released. In this module, you can use the Get-SPPreRequisites to download SharePoint 2010 prerequisite files …

SharePoint 2010 and PowerShell annoyances – Part 1: SharePoint backup

Microsoft and SharePoint product teams certainly did a good job by enabling out-of-box PowerShell management of SharePoint. It really provides some great power to IT professionals and administrators managing SharePoint farms. But, in my opinion, this is not the best implementation of PowerShell support. I will dig in to why I feel like that by quoting a few examples in each of these blog posts. Yes, I know, I could have written all this as product feedback during beta. But , nevertheless, I hope this reaches the product team at MS. I will start this series with a couple of SharePoint 2010 backup cmdlets. To perform SharePoint 2010 backup, there are actually 3 cmdlets — Backup-SPFarm, Backup-SPSite, and Backup-SPConfigurationDatabase. Backup-SPFarm Backup-SPFarm -BackupMethod <String> -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-BackupThreads <Int32>] [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Item <String>] [-Percentage <Int32>] [-WhatIf [<SwitchParameter>]] What is wrong with this cmdlet?  In short, many things..! 1. There is no -AsJob parameter. I know it requires PS remoting infrastructure but I don’t want to wait at the console until full backup …