Archive for the ‘Configuring’ Category

Gathering Requirements for SharePoint 2013

November 20, 2012 Leave a comment

The implementation of Microsoft SharePoint 2013 will be conducted in several distinct phases that include:

  • Discover and Refine Requirements
  • Analyze and Prioritize Requirements
  • Design a Solution That Meets the Requirements
  • Govern Solution Delivery, Operation, and Maintenance

This document will cover the first phase: Discover and Refine Requirements. In order to be successful in the planning of Microsoft SharePoint, we will focus on gathering requirements that focus on these key areas:

  • Understanding the Minimum Hardware Requirements
  • Understanding BCM Options
  • Planning a Successful SharePoint Solution Strategy
  • Planning a Governance Strategy
  • Planning the Information Architecture
  • Discovery of Business Processes that will use Microsoft SharePoint 2010
  • Understanding the Security Requirements
  • Understanding the Business Intelligence Requirements
  • Understanding how the Role of the Office Client
  • Understanding the Business Continuity Requirements
  • Understanding of Performance and Reliability Requirements

We will break down each of these sections in hopes of capturing all of the requirements in the planning phase as to alleviate any confusion or exclusion of the requirements.

Automating SharePoint 2010

After a long break from blogging,  Automating SharePoint 2010 with Windows PowerShell 2.0 is now complete and is scheduled to hit your local bookstore on June 28th, 2011.

Back Cover …

With SharePoint 2010’s PowerShell cmdlets, you can automate or manipulate almost every aspect of the SharePoint platform. Learn how to take full advantage of all this timesaving technology with the tips and techniques in this practical guide. Packed with step-by-step instructions, real-world examples, and best practice recommendations, this book gets you thoroughly up to speed on Windows PowerShell 2.0 features and SharePoint’s PowerShell implementation, saving you time and effort on tasks you do every day. Coverage includes:

  • Understanding what you need to know about Windows PowerShell syntax, structure, and usage
  • How to automate every aspect of a SharePoint 2010 installation, upgrade, and deployment
  • Managing Web Applications, Site Collections, security, and Solution Packages
  • How to automatically provision and configure virtually every Service Application
  • Backing up, restoring, and optimizing the performance of your SharePoint environment
  • Advanced topics such as remote administration and multi-tenancy
  • Creating custom cmdlets, type extensions, and views to make you even more productive (available as downloadable PDF)

SharePoint 2010 and the Site Directory

July 17, 2010 1 comment


You may have noticed that Central Administration offers you a screen to configure a master Site Directory in SharePoint 2010, but it does not give you the ability to create a site based off of this template through the UI. It appears that this functionality has been removed and is only available under the covers to support SharePoint 2007 upgrades that had this template included.

Once again…. PowerShell comes to the rescue. You can create a Site Directory using the following code snippet.


# Set the variables

$siteURL =”

$owner = “PS4SPShannon”

$secondOwner = “PS4SPAdministrator”

$template = “SPSSITES#0″

$description = “This site directory was built using PowerShell.”

$name = “Site Directory”

# Create the Site Directory

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name $name -Template $template -Description $description


Once you have your site directory created, you can then use PowerShell to configure your master Site Directory with the following code snippet.


# Set Site URL

$siteURL =”

# Site Directory Requirements can be one of the following:

# SiteDirectoryCatsOptional, OneSiteDirectoryCatMandatory, or AllSiteDirectoryCatMandatory

$requirements = “AllSiteDirectoryCatMandatory”

#Enforce Listings?

$enforce = $true

# Need to get site and web IDs

$site = get-SPSite $siteURL

$web = get-SPWeb $siteURL

# Get the farm

$farm = get-SPFarm

# Get the Site Directory fromn the Portal Service

$ps = $farm.Services | where {$_.GetType().Name -eq “PortalService”}

$ps.MasterSiteDirectoryLocation = $siteURL

$ps.MasterSiteDirectorySiteId = $site.ID

$ps.MasterSiteDirectoryWebId = $web.ID

$ps.EnforceNewListingForSites = $enforce

$ps.SiteDirectoryEntryRequirements = $requirements





Categories: Configuring

Configuring Content Deployment Settings

SharePoint 2010 provides many new cmdlets that let you interact and configure content deployment settings. These new cmdlets include the following:

  • New-SPContentDeploymentJob
  • Start-SPContentDeploymentJob
  • Get-SPContentDeploymentPath
  • Set-SPContentDeploymentPath
  • Remove-SPContentDeploymentPath
  • Set-SPContentDeploymentJob
  • Get-SPContentDeploymentJob
  • Remove-SPContentDeploymentJob

You can read up on content deployment and these cmdlet here. The cmdlet that you will find are related to Content Deployment Paths and Jobs. While these work very well and are easy to use, they are only part of the story. To fully configure Content Deployment, you need to set the ‘Accept Content Deployment Jobs’. SharePoint does not give you a cmdlet for these properties.

The code snippet below provides settings for content deployment within the same farm. If you wish to deploy content to another SharePoint farm, modify the ExportWebServer property below.

# Set the variables

$acceptJobs = $true

$secureConnection = $false

$tempFolder = “C:ProgramDataContentDeployment”

$ImportWebServer = “PS-SPS”

$exportWebServer = “PS-SPS”

$reportsPerJob = 20

$pollingInterval = 10

$fileMaxSize = 10

$blockMultiple = $true

# Get an instance of the ContentDeploymentConfiguration object and set the properties

$cs =[Microsoft.SharePoint.Publishing.Administration.ContentDeploymentConfiguration]::GetInstance()

$cs.AcceptIncomingJobs = $acceptJobs

$cs.RequiresSecureConnection = $secureConnection

$cs.TemporaryFolder = $tempFolder

$cs.ImportWebServer = $importWebServer

$cs.ExportWebServer = $exportWebServer

$cs.DefaultReportsPerJob = $reportsPerJob

$cs.RemotePollingINterval = $pllingInterval

$cs.FileMaxSize = $fileMaxSize

$cs.BlockMultipleJobsPerPath = $blockMultiple


Categories: Configuring

Modify Web Application Settings with PowerShell

June 27, 2010 1 comment



The SharePoint Web application has a number of settings that you can customize to configure your environment the way that suits your needs best. There are a number of different group: General, Resource Throttling, Workflow, Email, etc. All of these settings can be configured through PowerShell. These settings are available through the Microsoft.SharePoint.Administration.SPAdministrationWebApplication object. In order to modify these settings, we simply need to use the Get-SPWebApplication cmdlet and then make the changes we need. In order to save the changes, you must call the Update() method.


The Script

$siteURL =”

$webApp = Get-SPWebApplication $siteURL


# General Settings

$webApp.DefaultTimeZone = 12; # Mountain Time

$webApp.PresenceEnabled = $true

$webApp.AlertsEnabled = $true

$webApp.AlertsMaximum = 500

$webApp.SyndicationEnabled = $true

$webApp.MetaWeblogEnabled = $false

$webApp.MetaWeblogAuthenticationEnabled = $true

$webApp.BrowserFileHandling = [Microsoft.SharePoint.SPBrowserFileHandling]::Strict; # Permissive or Strict

$webApp.SendLoginCredentialsByEmail = $false

$webApp.MasterPageReferenceEnabled = $true

$webApp.MaximumFileSize = 100

$webApp.RecycleBinEnabled = $true

$webApp.RecycleBinCleanupEnabled = $true

$webApp.RecycleBinRetentionPeriod = 15

$webApp.SecondStageRecycleBinQuota = 25

$webApp.BrowserCEIPEnabled = $false

# Resource Throttling

$webApp.MaxItemsPerThrottledOperation = 5000

$webApp.MaxItemsPerThrottledOperationOverride = $true

$webApp.MaxItemsPerThrottledOperationWarningLevel = 2000

$webApp.MaxListItemRowStorage = 8

$webApp.MaxQueryLookupFields = 0

$webApp.DailyStartUnthrottledPrivilegedOperationsHour = 17

$webApp.DailyStartUnthrottledPrivilegedOperationsMinute = 0

$webApp.DailyUnthrottledPrivilegedOperationsDuration = 1

$webApp.IsBackwardsCompatible = [Microsoft.SharePoint.TriState]::false

$webApp.ChangeLogExpirationEnabled = $false

# Workflows

$webApp.UserDefinedWorkflowsEnabled = $true

$webApp.EmailToNoPermissionWorkflowParticipantsEnabled = $true

$webApp.ExternalWorkflowParticipantsEnabled = $false

# Email

$webApp.OutBoundMailReplyToAddress = “”

$webApp.OutboundMailSenderAddress = “”

$webApp.IncomingEmailServerAddress = “”

# Designer

$webApp.AllowDesigner = $true

$webApp.AllowRevertFromTemplate = $true

$webApp.AllowMasterPageEditing = $true

 $webApp.ShowURLStructure = $true

Categories: Configuring

Creating a Site Collection with PowerShell

June 27, 2010 2 comments


Once you have your web application provisioned, you will need to create a site collection with a top level site. The New-SPSite cmdlet allows you to create a new top level site with the URL and owner specified in the –URL and –OwnerAlias. You will also notice that we have the ability to configure our tenant administration. In fact, in order to configure multi-tenants, you must use PowerShell. The site templates available in SharePoint Foundation include the following:

  • STS#0   Team Site
  • STS#1   Blank Site
  • STS#2   Document Workspace
  • MPS#0   Basic Meeting Workspace
  • MPS#1   Blank Meeting Workspace
  • MPS#2   Decision Meeting Workspace
  • MPS#3   Social Meeting Workspace
  • MPS#4   Multipage Meeting Workspace
  • WIKI#0   Wiki
  • BLOG#0   Blog

The Cmdlet


New-SPSite [-Url] <String> -OwnerAlias <SPUserPipeBind> [-AdministrationSiteType <None | TenantAdministration>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ContentDatabase <SPContentDatabasePipeBind>] [-Description <String>][-HostHeaderWebApplication <SPWebApplicationPipeBind>] [-Language <UInt32>] [-Name <String>] [-OwnerEmail <String>] [-QuotaTemplate <SPQuotaTemplatePipeBind>] [-SecondaryEmail <String>] [-SecondaryOwnerAlias <SPUserPipeBind>] [-SiteSubscription <SPSiteSubscriptionPipeBind>] [-Template <SPWebTemplatePipeBind>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

The Script


$siteURL =;

$owner = “PS4SPShannon”

$secondOwner = “PS4SPAdministrator”

$template = “STS#0″

$description = “This is a sample site that was built using PowerShell.”

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name “PowerShell for SharePoint” -Template $template -Description $description

Categories: Configuring

Creating a SharePoint Web Application with PowerShell


Now that we have provisioned SharePoint and added our host ‘A’ record with PowerShell, it is time to move on to creating the Web application. Prior to creating a SharePoint site collection, you must have a web application in Internet Information Services (IIS). A web application has a content database and application pool associated with it and is assigned to one of five zones: Default, Intranet, Internet, Custom, and Extranet.

You can assign a Web application to a host ‘A’ record or use your machine name. If you plan on having more than one Web application on the same URL, you must use a different port number for the web application. In a standard web application, the port number is 80 by default. In this example, we will create a new Web application using ‘’ on port 80. We will also use Classic Mode Authentication for the time being. We will change this as we get the farm up and running.

There are a number of advance configuration options here that will allow us to set up authentication and additional claims providers. We will take a look at these when we build a claims-aware web application.

Figure 1


The Cmdlets



This cmdlet creates a new Web application specified by the Name parameter. The user specified by the DatabaseCredentials parameter must be a member of the dbcreator fixed server role on the database server.

New-SPWebApplication -ApplicationPool <String> -Name <String> [-AdditionalClaimProvider <SPClaimProviderPipeBind[]>] [-AllowAnonymousAccess <SwitchParameter>] [-ApplicationPoolAccount <SPProcessAccountPipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-AuthenticationMethod <String>] [-AuthenticationProvider <SPAuthenticationProviderPipeBind[]>] [-Confirm [<SwitchParameter>]] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-HostHeader <String>] [-Path <String>] [-Port <UInt32>] [-SecureSocketsLayer <SwitchParameter>] [-ServiceApplicationProxyGroup <SPServiceApplicationProxyGroupPipeBind>] [-SignInRedirectProvider <SPTrustedIdentityTokenIssuerPipeBind>] [-SignInRedirectURL <String>] [-Url <String>] [-WhatIf [<SwitchParameter> ]] [<CommonParameters>]

The Script


$siteName = “PowerShell for SharePoint”

$port = 80

$hostHeader = “”

$url =;

$appPoolName = “PS4SPAppPool”

$managedAccount = “PS4SPspservice”

$dbServer = “PS-SQL”

$dbName = “PS4SP_SP2010_LAB_ContentDB”

$allowAnonymous = $true

$authenticationMethod = “NTLM”

$ssl = $false

New-SPWebApplication -Name $siteName -Port $port -HostHeader $hostHeader -URL $url -ApplicationPool $appPoolName -ApplicationPoolAccount (Get-SPManagedAccount “$managedAccount”) -DatabaseName $dbName -DatabaseServer $dbServer -AllowAnonymousAccess: $allowAnonymous -AuthenticationMethod $authenticationMethod -SecureSocketsLayer:$ssl

Categories: Configuring

SharePoint Managed Accounts and PowerShell


Managed Accounts are Active Directory user accounts whose credentials are managed by and contained within SharePoint. Managed Accounts in SharePoint are new in 2010. Managed Accounts allow you to implement password changes across all services in the farm. You create these accounts in Active Directory and then register these accounts in SharePoint, allowing you to use these accounts in services and web applications.

We will be using Managed Accounts in the creation of our PowerShell farm and many of the script that will be used on this site will require their setup.

The Cmdlets


The Get-SPMangedAccount will return a list of the Managed Accounts for the Farm.


The New-SPManagedAccount will allow you to map an Active Directory account to SharePoint and then manage the account through SharePoint.


The Remove-SPManagedAccount will remove the SharePoint mapping to the Active Directory account.


The Set-SPManagedAccount cmdlet sets the properties on the given managed account. You can use this cmdlet to change the password expiration and notification settings for the managed account.

The Script

You can use the Get-SPManagedAccount to retrieve a list of all over your managed accounts.

Figure 1

Once an account is added to Active Directory, you can use the following PowerShell script to add a new Managed Account.

    $cred = Get-Credential

    New-SPManagedAccount –Credential $cred

When this code is executed, it will prompt you for the account you wish to use, as indicated in Figure 2.

Figure 2


Once this completes, you can run the Get-SPManagedAccount to get an updated list.

Figure 3

To remove the account, you may use the Remove-SPManagedAccount as follows:

    Remove-SPManagedAccount “PS4SPspservice”

You will be prompted prior to removing the account, as shown in Figure 4.

Figure 4

Categories: Configuring

Add a Host ‘A’ Record Using PowerShell

June 27, 2010 2 comments



Prior to creating a new Web Application in our SharePoint 2010 environment, I would like to add a host A record to DNS so that the URL we assign to our web application is directed to the appropriate IP Address. I will create a new address record for ‘’ and associate it to

In this example, I have the following setup:

    Domain Name:

    Domain Controller Name: PS-DC

    SharePoint Server Name: PS-SPS

    SharePoint Server IP:

In figure 1 below, you should be able to confirm these details.

Figure 1

In order to accomplish this task in PowerShell, we will use MicrosoftDNS_AType, which is a subclass of MicrosoftDNS_ResourceRecord that represents a host Address (A) record. We then use the CreateInstanceFromPropertyData to create the address record.

DnsServerName [in]

Fully Qualified Domain Name (FQDN) or IP address of the DNS Server that contains this RR.

ContainerName [in]

Name of the Container for the Zone, Cache, or RootHints instance which contains this RR.

OwnerName [in]

Owner FQDN for the RR.

Note  Do not use the owner NetBIOS name.

RecordClass [in, optional]

Class of the RR. Default value is 1. The following values are valid.

TTL [in, optional]

Time, in seconds, that the RR can be cached by a DNS resolver.

IPAddress [in]

String representing the IP address of the host.

RR [out]

Reference to the new object.

The Script


# Set the FQDN of the domain controller

$dnsServer = “”

# Set the dns zone name of where to place the host A record

$dnsZone = “”

# Set the name of the Host A

$hostA = “”

# Set the class: 1 = Internet, 2 = CSNet, 3 = CHAOS, 4 = Hesiod

$class = 1

# Set the TTL, time that the RR can be cached

$ttl = 3600

# Set the IP Address of the destination

$IPAddress = “”

# Assign the MicrosoftDNS_AType

$dnsAType = [wmiclass]“\$dnsServerrootMicrosoftDNS:MicrosoftDNS_AType”

# Use CreateInstanceFromPropertyData to create the host A record

$dnsAType.CreateInstanceFromPropertyData($DNSserver, $dnsZone, $hostA, $class, $ttl, $IPAddress)

The Results


Figure 2 shows how the script looks inside PowerShell ISE. Figure 3 show the results of the command inside the DNS Manager.

Figure 2

Figure 3

Categories: Configuring

Use PowerShell to Make SharePoint Read-only



Prior to migrating content from one environment to another, it is important to lock or write-protect a particular site-collection. This will help to ensure that your users will not lose site changes they are making. The following PowerShell script will allow you to set the ReadOnly and WriteLocked property of the site collection. Line three of the following script will allow you to toggle the property as needed.


The Script


# Specify the site collection url

$siteURL = http://ps-moss/&#8221;

$setLock = $true

# Load the Microsoft.SharePoint DLL

[void][system.reflection.assembly]::load(“Microsoft.Sharepoint, version=, culture=neutral, publickeytoken=71e9bce111e9429c”)

# Create a new site object using the siteURL –> This will require a Dispose

$site = new-object Microsoft.SharePoint.SPSite($siteURL)

$site.WriteLocked = $setLock

$site.ReadOnly = $setLock

# Review the properties of the site


# Dispose of the site object


Categories: Configuring

Get every new post delivered to your Inbox.

Join 29 other followers