<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
    <title>SharePointChick.com</title>
    <link rel="self" type="application/atom+xml" href="http://sharepointchick.com/Atom.aspx" />
    <subtitle type="html">Adventures in SharePoint by Mirjam van Olst</subtitle>
    <id>http://sharepointchick.com/Default.aspx</id>
    <author>
        <name>Mirjam</name>
        <uri>http://sharepointchick.com/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 2.1.2.2">Subtext</generator>
    <updated>2010-03-02T00:48:56Z</updated>
    <entry>
        <title>Copy SharePoint production data to a test environment</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2010/03/01/copy-sharepoint-production-data-to-a-test-environment.aspx" />
        <id>http://sharepointchick.com/archive/2010/03/01/copy-sharepoint-production-data-to-a-test-environment.aspx</id>
        <published>2010-03-01T15:02:43Z</published>
        <updated>2010-03-02T00:48:56Z</updated>
        <content type="html">&lt;p&gt;In a lot of SharePoint projects you will be required to deploy customizations after the customer has started using the solution. In cases like this it’s very important to test all customizations extensively on a test and/or user acceptance environment before deploying them to production.  &lt;br /&gt;In order to be able to do tests that, to a certain degree, can guarantee that both the current and the new functionality will work on your production environment you need an environment that matches your production environment in a lot of ways.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;As similar a hardware setup as possible &lt;/li&gt;    &lt;li&gt;Same Windows Server and SQL Server versions and setup &lt;/li&gt;    &lt;li&gt;Same SharePoint version and setup &lt;/li&gt;    &lt;li&gt;Same third party tools installed &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;All of the above are fairly straightforward to implement using standard tools and processes. However in order to be able to properly test your solution you will also need very similar data on your test, user acceptance and production environment. This is a bit more difficult to achieve. There are several third party tools that you could buy that will help you to move around SharePoint data, but you can also achieve this using free and standard tools and scripts.&lt;/p&gt;  &lt;p&gt;If you want to copy data from you production environment to your test environment and you want to environment to still function as it’s supposed to as well you need to take four different steps that, apart from the actual copying of the data also involve preparing your environments for the data move and finalizing them after the data has been copied. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Create the Active Directory accounts that are used in the production environment in the test domain or OU &lt;/li&gt;    &lt;li&gt;Backup the SharePoint data from the production environment &lt;/li&gt;    &lt;li&gt;Restore SharePoint data on the test environment &lt;/li&gt;    &lt;li&gt;Migrate the users in your SharePoint environment from their production version to their test equivalent &lt;/li&gt; &lt;/ol&gt;  &lt;ol&gt;   &lt;li&gt;To assist with the Active Directory export and import of accounts the first thing I did was download the Quest Free PowerShell Commands for Active Directory &lt;a href="http://www.quest.com/powershell/activeroles-server.aspx" target="_blank"&gt;here&lt;/a&gt;. Next step was to write a PowerShell script to export the users from the Production Active Directory to an XML file. Install the ActiveRolesManagementShell on the domain controller and make sure the add-in is loaded in PowerShell. Now run the export command:       &lt;br /&gt;      &lt;pre&gt;&lt;span style="color: #2b91af"&gt;add-PSSnapin&lt;/span&gt; quest.activeroles.admanagement 
&lt;span style="color: #2b91af"&gt;get-QADUser&lt;/span&gt; -SearchRoot &lt;span style="color: maroon"&gt;"OU=Company,OU=ContainerName,DC=DomainName,DC=com"&lt;/span&gt; &lt;br /&gt;   -SerializeValues -SizeLimit &lt;span style="color: maroon"&gt;0&lt;/span&gt; | &lt;span style="color: #2b91af"&gt;Export-Clixml&lt;/span&gt; ADUsers.xml &lt;/pre&gt;

    &lt;br /&gt;The exported XML looks like this: 

    &lt;pre&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employees&lt;/span&gt; &lt;span style="color: red"&gt;xmlns:xsi&lt;/span&gt;="&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectClass&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;top,person,organizationalPerson,user&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectSid&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0105000000000005150000002E2314E71F387BEE9F955DED490E0000&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;name&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith@Company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;displayName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;John Smith&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;givenName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;John&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;whenCreated&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/20/2009 16:11:21&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectGUID&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;84576687B7A0CE49BB67FD71B1BAD046&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;primaryGroupID&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;513&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;sAMAccountName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;whenChanged&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/25/2009 10:04:52&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;userPrincipalName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith@Company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;mail&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;john.smith@company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;sn&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Smith&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectClass&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;top,person,organizationalPerson,user&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectSid&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0105000000000005150000002E2314E71F387BEE9F955DED0D1A0000&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;name&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe@Company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;displayName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Jane Doe&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;givenName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Jane&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;whenCreated&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/20/2009 17:01:04&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;objectGUID&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;A631C68C086D5A488565F99898F1E5CD&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;primaryGroupID&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;513&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;sAMAccountName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;whenChanged&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;01/13/2010 15:47:55&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;userPrincipalName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe@Company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;mail&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;jane.doe@company.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;S &lt;span style="color: red"&gt;N&lt;/span&gt;="&lt;span style="color: blue"&gt;sn&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Doe&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;S&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;br /&gt;The XML will get a bit easier to process if you transform it slightly by using a short XSLT script: 

    &lt;pre&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: maroon"&gt;xml&lt;/span&gt; &lt;span style="color: red"&gt;version&lt;/span&gt;="&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;="&lt;span style="color: blue"&gt;UTF-8&lt;/span&gt;"&lt;span style="color: blue"&gt;?&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:stylesheet&lt;/span&gt; &lt;span style="color: red"&gt;version&lt;/span&gt;="&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;xmlns:xsl&lt;/span&gt;="&lt;span style="color: blue"&gt;http://www.w3.org/1999/XSL/Transform&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;/&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:apply-templates&lt;/span&gt; /&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;Employee&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:apply-templates/&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;S&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;lt;&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;@N&lt;/span&gt;"/&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;.&lt;/span&gt;"/&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;lt;&lt;/span&gt;/&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;@N&lt;/span&gt;"/&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:stylesheet&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;br /&gt;After we transformed the XML we also do some text replacements. In my case the test environment uses the same domain as the production environment is. Because of this I have to create new usernames. Because I don’t want to send the users email from the test environment I change the email addresses to non-existing or test email addresses. 

    &lt;br /&gt;The XML now looks like this: 

    &lt;pre&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectClass&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;top,person,organizationalPerson,user&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectClass&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectSid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0105000000000005150000002E2314E71F387BEE9F955DED490E0000&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectSid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith@CompanyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;displayName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;John Smith&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;displayName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;givenName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;John&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;givenName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;whenCreated&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/20/2009 16:11:21&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;whenCreated&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectGUID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;84576687B7A0CE49BB67FD71B1BAD046&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectGUID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;primaryGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;513&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;primaryGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;sAMAccountName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith_Test&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;sAMAccountName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;whenChanged&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/25/2009 10:04:52&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;whenChanged&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;userPrincipalName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JSmith@CompanyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;userPrincipalName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;mail&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;doesnotexist@companyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;mail&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;sn&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Smith&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;sn&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectClass&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;top,person,organizationalPerson,user&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectClass&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectSid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;0105000000000005150000002E2314E71F387BEE9F955DED490F0000&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectSid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe@CompanyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;displayName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Ricardo Hooijmaijers&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;displayName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;givenName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Ricardo&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;givenName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;whenCreated&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/20/2009 16:35:52&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;whenCreated&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;objectGUID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;AB161693EC231D41A0C9F72F1279411C&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;objectGUID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;primaryGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;513&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;primaryGroupID&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;sAMAccountName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe_Test&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;sAMAccountName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;whenChanged&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;09/25/2009 10:04:53&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;whenChanged&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;userPrincipalName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;JDoe@CompanyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;userPrincipalName&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;mail&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;doesnotexist@companyTest.com&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;mail&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
		&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;sn&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Doe&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;sn&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employee&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;Employees&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;br /&gt;In order to be able to use all user accounts for testing purposes I use the same password for all users on the test environment. 

    &lt;br /&gt;We can now run the PowerShell script that creates the users in the test environment. The script adds all users to a group called &lt;a href="mailto:AllUsers@Company"&gt;AllUsers@Company&lt;/a&gt; – Test right away. The new-QADUser cmdlet returns a user and that user is fed into the add-QADGroupMember cmdlet by using the | (pipe) symbol.  &lt;pre&gt;&lt;span style="color: #2b91af"&gt;add-pssnapin&lt;/span&gt; quest.activeroles.admanagement

&lt;span style="color: #2b91af"&gt;cd&lt;/span&gt; &lt;span style="color: maroon"&gt;"C:\ADUsers"&lt;/span&gt;
[xml]&lt;span style="color: #35687d"&gt;$userfile&lt;/span&gt; = &lt;span style="color: #2b91af"&gt;Get-Content&lt;/span&gt; ADUsers.xml

&lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #35687d"&gt;$user&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; &lt;span style="color: #35687d"&gt;$userfile&lt;/span&gt;.Employees.Employee)
{
   &lt;span style="color: #2b91af"&gt;new-qaduser&lt;/span&gt; -ParentContainer &lt;span style="color: maroon"&gt;"OU=Company - Test,OU=ContainerName - Test,DC=DomainName,DC=com"&lt;/span&gt; -Name &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.name &lt;br /&gt;-UserPassword &lt;span style="color: maroon"&gt;"Password1"&lt;/span&gt; -Email &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.mail -FirstName &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.givenName -LastName &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.sn &lt;br /&gt;-samAccountName &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.sAMAccountName -UserPrincipalName &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.userPrincipalName -DisplayName &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.DisplayName &lt;br /&gt;| add-QADGroupMember -identity &lt;span style="color: maroon"&gt;&lt;a href="mailto:CN=AllUsers@Company - Test,CN=_Private,OU=Company - Test,OU=Container - Test,DC=DomainName,DC=com"&gt;CN=AllUsers@Company - Test,CN=_Private,OU=Company - Test,OU=Container - Test,DC=DomainName,DC=com&lt;/a&gt;&lt;/span&gt;  
   &lt;span style="color: #2b91af"&gt;Write-Host&lt;/span&gt; &lt;span style="color: #35687d"&gt;$user&lt;/span&gt;.AccountName
}&lt;/pre&gt;
  &lt;/li&gt;

  &lt;li&gt;The next step is to backup the data from the production environment.  Before we can simply backup the  content database we have to “unhook” it from the production environment. We do this by running the STSADM preparetomove command. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;em&gt;STSADM –o preparetomove –contentdb SQLServerInstance:ContentDBName&lt;/em&gt; 

    &lt;br /&gt;

    &lt;br /&gt;Now just make a SQL Server backup. 

    &lt;br /&gt;Next we have to undo the preparetomove command, or else the user profile info won’t sync to the user info lists in the site collections in that particular content database anymore. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;em&gt;STSADM –o preparetomove –contentdb SQLServerInstance:ContentDBName –undo&lt;/em&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;We can now copy the database backup file from the production environment to the test environment and restore it on our SQL Server test environment. Next we go into the SharePoint test environment. You might want to delete the current content database in the test environment, before adding the newly restored one. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;em&gt;STSADM –o deletecontentdb –url &lt;/em&gt;&lt;a href="http://testportalurl"&gt;&lt;em&gt;http://testportalurl&lt;/em&gt;&lt;/a&gt;&lt;em&gt; –databasename ContentDBName 
      &lt;br /&gt;

      &lt;br /&gt;&lt;/em&gt;Running the STSADM deletecontentdb command won’t delete your database from SQL, it will only delete it from SharePoint. This means that the data is still on the SQL Server, the sites just aren’t accessible anymore through SharePoint. 

    &lt;br /&gt;

    &lt;br /&gt;Now we are ready to add the restored content database to our SharePoint test environment. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;em&gt;STSADM –o addcontentdb –url &lt;/em&gt;&lt;a href="http://testportalurltipharmamosacc.macawhosting.net"&gt;&lt;em&gt;http://testportalurl&lt;/em&gt;&lt;/a&gt;&lt;em&gt; –databasename ContentDBName 
      &lt;br /&gt;

      &lt;br /&gt;&lt;/em&gt;Go into Central Administration, browse to Application Management and click on Policy for Web Application. Give yourself Full Control on the web application where you just added the content database, so you can test whether it’s working. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Now all we have to do is tell SharePoint how to map the production users accounts to the test user accounts, to make sure that the permissions for all accounts will work like they do on the production environment. We use the STSADM migrateuser command for this. Be aware that you need to use the sAMAccountName for this, using the userPrincipalName won’t work. For generating the migrateuser statements I have written a small XSLT script that uses the ADUsers.xml file. 
    &lt;br /&gt;

    &lt;br /&gt;

    &lt;pre&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: maroon"&gt;xml&lt;/span&gt; &lt;span style="color: red"&gt;version&lt;/span&gt;="&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;encoding&lt;/span&gt;="&lt;span style="color: blue"&gt;UTF-8&lt;/span&gt;"&lt;span style="color: blue"&gt;?&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:stylesheet&lt;/span&gt; &lt;span style="color: red"&gt;version&lt;/span&gt;="&lt;span style="color: blue"&gt;1.0&lt;/span&gt;" &lt;span style="color: red"&gt;xmlns:xsl&lt;/span&gt;="&lt;span style="color: blue"&gt;http://www.w3.org/1999/XSL/Transform&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;/&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:apply-templates&lt;/span&gt; /&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;Employee&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:apply-templates&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;sAMAccountName&lt;/span&gt;" /&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt; &lt;span style="color: red"&gt;match&lt;/span&gt;="&lt;span style="color: blue"&gt;sAMAccountName&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;stsadm -o migrateuser -oldlogin domainname\&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;.&lt;/span&gt;"/&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt; &lt;span style="color: red"&gt;disable-output-escaping&lt;/span&gt;="&lt;span style="color: blue"&gt;yes&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt; -newlogin domainname\&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:text&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color: red"&gt;select&lt;/span&gt;="&lt;span style="color: blue"&gt;.&lt;/span&gt;"/&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon"&gt;br&lt;/span&gt; /&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:template&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;/&lt;span style="color: maroon"&gt;xsl:stylesheet&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;br /&gt;This will generate a statement that looks like this: 

    &lt;br /&gt;

    &lt;br /&gt;&lt;em&gt;stsadm -o migrateuser -oldlogin domainname\JSmith_Test -newlogin domainname\JSmith_Test –ignoresidhistory 
      &lt;br /&gt;stsadm -o migrateuser -oldlogin domainname\JDoe_Test -newlogin domainname\JDoe_Test –ignoresidhistory&lt;/em&gt; 

    &lt;br /&gt;

    &lt;br /&gt;This is almost what we want. The only thing left to do is a text replacement to make sure that the old login is actually the production account. So we replace “_Test –newlogin” with “ –newlogin”. &lt;/li&gt;
&lt;/ol&gt;

&lt;br /&gt;

&lt;h3&gt;Wrap up&lt;/h3&gt;

&lt;p&gt;The above 4 steps will help you to restore you production data on your test environment. While the process described in this post might look difficult and elaborate it is actually fairly straight forward and fast. Most of the fiddling is with transforming XML and the longest running operations are (by far) the export and import of AD users. &lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/79.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/79.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/79.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/79.aspx</trackback:ping>
    </entry>
    <entry>
        <title>SharePoint Must Read: SharePoint 2007 Memory Leak</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2010/02/08/sharepoint-must-read-sharepoint-2007-memory-leak.aspx" />
        <id>http://sharepointchick.com/archive/2010/02/08/sharepoint-must-read-sharepoint-2007-memory-leak.aspx</id>
        <published>2010-02-08T23:23:01Z</published>
        <updated>2010-02-08T23:23:01Z</updated>
        <content type="html">&lt;p&gt;I usually don’t do link blogs, but this is a must read for everyone implementing SharePoint.&lt;/p&gt;  &lt;p&gt;PFE and MCM instructor Todd Carter posted the details of his findings on his blog.   &lt;br /&gt;&lt;a href="http://todd-carter.com/post/2010/02/08/SharePointe28099s-Sasquatch-Memory-Leak.aspx"&gt;&lt;strong&gt;Todd's Blog | SharePoint’s Sasquatch Memory Leak&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Oh and it will be worth keeping an eye out for Todd’s future posts as well..&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/78.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/78.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/78.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/78.aspx</trackback:ping>
    </entry>
    <entry>
        <title>SharePoint Connections Amsterdam Wrap-Up</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2010/02/06/sharepoint-connections-amsterdam-wrap-up.aspx" />
        <id>http://sharepointchick.com/archive/2010/02/06/sharepoint-connections-amsterdam-wrap-up.aspx</id>
        <published>2010-02-06T18:44:18Z</published>
        <updated>2010-02-06T18:52:18Z</updated>
        <content type="html">&lt;p&gt;I know it’s been a while since the conference, but I still wanted to write a short wrap up.&lt;/p&gt;  &lt;p&gt;The conference was great. It was sold out, another sign of the fact that SharePoint is a booming business and people love to hear about what’s new in SharePoint 2010.    &lt;br /&gt;The goal of the conference was to redeliver some of the content from the SharePoint Conference in Las Vegas in October. Since this one only lasted two days it was impossible to cover all the content, but overall I think there was a lot of great content and the most important areas were covered.&lt;/p&gt;  &lt;p&gt;Also, &lt;a title="Matthijs Hoekstra's blog" href="http://blogs.microsoft.nl/blogs/mhoekstra/" target="_blank"&gt;Matthijs Hoekstra&lt;/a&gt; arranged for all sessions to be recorded and put up on Channel 9 (developer sessions) and TechNet TV (IT Pro sessions). &lt;/p&gt;  &lt;p&gt;The complete list of sessions is up on &lt;a title="List of videos of SharePoint Connection Amsterdam sessions" href="http://blogs.microsoft.nl/blogs/mhoekstra/archive/2010/01/31/sharepoint-connections-2010-amsterdam-session-videos-are-online.aspx" target="_blank"&gt;Matthijs’ blog&lt;/a&gt;, or you can search on SPC10 (&lt;a title="http://channel9.msdn.com/tags/spc10/" href="http://channel9.msdn.com/tags/spc10/"&gt;http://channel9.msdn.com/tags/spc10/&lt;/a&gt; and &lt;a title="http://edge.technet.com/Tags/spc10/" href="http://edge.technet.com/Tags/spc10/"&gt;http://edge.technet.com/Tags/spc10/&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;My sessions are on there as well. I still find it weird and uncomfortable to look at and listen to myself, but it’s pretty cool to have content on Channel 9 and TechNet, so I’ll just suck it up and try to get used to it.    &lt;br /&gt;These were the sessions that I delivered at the conference:&lt;/p&gt;  &lt;p&gt;&lt;a title="Overview and What's New for SharePoint 2010 IT Pros" href="http://edge.technet.com/Media/Overview-and-Whats-New-for-SharePoint-2010-IT-Pros/"&gt;Overview and What's New for SharePoint 2010 IT Pros&lt;/a&gt;     &lt;br /&gt;This is an overview session. The session will go through IT Pro-related features in SharePoint 2010. It will cover the new IT Pro experience including deployment and upgrade, management and operation, backup and restore, availability and scalability.&lt;/p&gt;  &lt;p&gt;&lt;a title="Growing SharePoint from Small Libraries to Large Scale Repositories and Massive Archives" href="http://edge.technet.com/Media/Growing-SharePoint-from-Small-Libraries-to-Large-Scale-Repositories-and-Massive-Archives/"&gt;Growing SharePoint from Small Libraries to Large Scale Repositories and Massive Archives&lt;/a&gt;     &lt;br /&gt;SharePoint allows you to store many documents in an environment and end users will want to store, find and retrieve documents and information quickly and easily. In this session, a lot of new SharePoint 2010 features will be demonstrated that will help them do just that. Expect to see enterprise content types, the term store, managed metadata, records management and lots more!&lt;/p&gt;  &lt;p&gt;&lt;a title="Upgrading your SharePoint 2007 solutions to SharePoint 2010" href="http://channel9.msdn.com/posts/matthijs/Upgrading-your-SharePoint-2007-solutions-SharePoint-2010/" target="_blank"&gt;Upgrading your SharePoint 2007 solutions to SharePoint 2010&lt;/a&gt; (this one was a duo presentation with &lt;a href="http://weblogs.asp.net/soever" target="_blank"&gt;Serge van den Oever&lt;/a&gt;)     &lt;br /&gt;With SharePoint 2010 a lot will change for developers, but of course you will still want to keep using some of the cool solutions that you built for SharePoint 2007. This session will explain how you can best upgrade the custom code that you wrote using Visual Studio 2008 for SharePoint 2007 to work with Visual Studio 2010 and SharePoint 2010. The session will demonstrate the project upgrade tools, show you the APIs that are involved in migrating and what new APIs you should consider using, and will tell you when you will be bound to have to upgrade your code manually.&lt;/p&gt;  &lt;p&gt;Thanks to the SharePoint Connections crew and Microsoft Netherlands for putting up a good show and thanks everyone that attended for showing up and making the conference a success. I’m looking forward to seeing you all there next time!&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/77.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/77.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/77.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/77.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Free eMagazine on SharePoint 2010</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2010/01/18/free-emagazine-on-sharepoint-2010.aspx" />
        <id>http://sharepointchick.com/archive/2010/01/18/free-emagazine-on-sharepoint-2010.aspx</id>
        <published>2010-01-18T22:24:28Z</published>
        <updated>2010-01-18T22:24:28Z</updated>
        <content type="html">&lt;p&gt;The Dutch Information Worker User Group (DIWUG) and the Software Development Network (SDN) produced a free SharePoint eMagazine with a lot of interesting articles on a wide variety of topics from an impressive group of international authors.    &lt;br /&gt;    &lt;br /&gt;The SharePoint 2010 Enterprise - Sjoerd van Lochem&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="SharePoint eMagazine Cover" border="0" alt="SharePoint eMagazine Cover" align="right" src="http://sharepointchick.com/images/sharepointchick_com/WindowsLiveWriter/FreeeMagazineonSharePoint2010_1492A/SharePoint_eMagazine_Cover_3.png" width="173" height="244" /&gt;     &lt;br /&gt;Customizing the SharePoint Ribbon - Marianne van Wanrooij     &lt;br /&gt;Visual Studio extensions or a manually build solution? - Niels Loup     &lt;br /&gt;Working With Data in SharePoint Designer 2010 - Laura Rogers     &lt;br /&gt;Sandboxed Solutions in SharePoint 2010 – Mirjam van Olst     &lt;br /&gt;New ECM features in SharePoint 2010 – Robert van Son     &lt;br /&gt;Creating new Visual Experiences with Visio Services - Toni Frankola     &lt;br /&gt;How to guides - Visio Services 55     &lt;br /&gt;A SharePoint User eXperience – Sandra de Ridder     &lt;br /&gt;Introduction to the Business Connectivity Services – Nick Swan     &lt;br /&gt;SharePoint 2010 Client Object Models – Ton Stegeman     &lt;br /&gt;Understanding Identity in SharePoint 2010 - Michiel van Otegem     &lt;br /&gt;Happy Together in 2010 - Dux     &lt;br /&gt;SharePoint 2010 Chart Web Part - Agnes Molnar     &lt;br /&gt;Enrich your SharePoint 2010 portal by integrating SAP applications - Cyrille Visser, Johan Kroese and Huub Montanus     &lt;br /&gt;SharePointComic – Dan Lewis &lt;/p&gt;  &lt;p&gt;The magazine can be downloaded in high-res or for use on ereaders &lt;a href="http://www.sdn.nl/FreeMagazine/" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/76.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/76.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/76.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/76.aspx</trackback:ping>
    </entry>
    <entry>
        <title>General PowerShell tips for SharePoint gurus and PowerShell newbies</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/12/19/general-powershell-tips-for-sharepoint-gurus-and-powershell-newbies.aspx" />
        <id>http://sharepointchick.com/archive/2009/12/19/general-powershell-tips-for-sharepoint-gurus-and-powershell-newbies.aspx</id>
        <published>2009-12-19T21:01:56Z</published>
        <updated>2009-12-19T21:01:56Z</updated>
        <content type="html">&lt;p&gt;If you’ve been working with SharePoint for a while and you’ve been happily coding and clicking and STSADM-ing away you need to get skilled up in writing PowerShell scripts as well now.&lt;/p&gt;  &lt;p&gt;In my last post I described my first useful PowerShell script. While writing that I bumped in to a couple of things that took me a while to figure out, so I decided to list them in this post to try and save others some time.&lt;/p&gt;  &lt;p&gt;The first one is loading another PowerShell file in the current script. This can be useful if you have to load an existing file into your script, like SharePoint.ps1, but it can also be useful if you want to save parts of your script to separate files so you can reuse the different pieces more easily.    &lt;br /&gt;Loading a file into a PowerShell script can be done by typing .\ followed by the filename. If the file you want to load is stored in a different directory than the file your currently working on you need to tell PowerShell what directory to look in by using the cd  command that should be familiar from the old school command prompt.&lt;/p&gt;  &lt;pre&gt;    &lt;span style="color: #2b91af"&gt;cd&lt;/span&gt; &lt;span style="color: maroon"&gt;'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration'&lt;/span&gt;
    .\SharePoint.ps1&lt;/pre&gt;

&lt;br /&gt;

&lt;p&gt;Another nice little trick is creating a variable of the type Array. The first thing you probably noticed is that PowerShell variables aren’t declared. They are just created on first assignment. Something else that stands out is that all variables start with a $. PowerShell variables are polymorphic by default. This means that you can store any type of object in them.In my script I assign strings to the variable, separated by commas. This will get us and array of strings. If I would have assigned numbers separated by commas it would have been an array of integers.&lt;/p&gt;

&lt;pre&gt;    &lt;span style="color: green"&gt;#An array of strings&lt;/span&gt;
    &lt;span style="color: #35687d"&gt;$users&lt;/span&gt; = &lt;span style="color: maroon"&gt;"john"&lt;/span&gt;, &lt;span style="color: maroon"&gt;"paul"&lt;/span&gt;, &lt;span style="color: maroon"&gt;"mirjam"&lt;/span&gt;

    &lt;span style="color: green"&gt;#An array of integers&lt;/span&gt;
    &lt;span style="color: #35687d"&gt;$users&lt;/span&gt; = &lt;span style="color: maroon"&gt;5&lt;/span&gt;, &lt;span style="color: maroon"&gt;6&lt;/span&gt;, &lt;span style="color: maroon"&gt;7&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;In the above example you can see that you can write comments by putting a # in front of the text.&lt;/p&gt;

&lt;p&gt;The next tip was also explained in my last post. If you put a string in PowerShell in single quotes it is seen as a “Literal string”. This means that the string will be represented exactly as it is displayed within the quotes. A string in double quotes is an “Expandable string”. So a string in double quotes can contain variables and special characters such as newlines and they will be expanded when you run the script. &lt;/p&gt;

&lt;pre&gt;    Suser = &lt;span style="color: maroon"&gt;"Mirjam"&lt;/span&gt;

    &lt;span style="color: green"&gt;#String in double quotes&lt;/span&gt;
    &lt;span style="color: #2b91af"&gt;Write-Output&lt;/span&gt; &lt;span style="color: maroon"&gt;"Site created for $user"&lt;/span&gt; 
    
    &lt;span style="color: green"&gt;#String in single quotes&lt;/span&gt;
    &lt;span style="color: #2b91af"&gt;Write-Output&lt;/span&gt; &lt;span style="color: maroon"&gt;'Site created for $user'&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;The output for the above script will be: 
  &lt;br /&gt;Site created for Mirjam 

  &lt;br /&gt;Site created for $user&lt;/p&gt;

&lt;p&gt;This doesn’t only work when writing stuff to the screen, it also works in expressions.&lt;/p&gt;

&lt;p&gt;The next question of course is how do you know what PowerShell commands are available to you if you want to manage SharePoint using PowerShell. 
  &lt;br /&gt;A very good place to start is here &lt;a title="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=045f7af5-b226-4a05-8ace-4e17cfdef856&amp;amp;utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+MicrosoftDownloadCenter+%28Microsoft+Download+Center%29" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=045f7af5-b226-4a05-8ace-4e17cfdef856&amp;amp;utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+MicrosoftDownloadCenter+%28Microsoft+Download+Center%29"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=045f7af5-b226-4a05-8ace-4e17cfdef856&amp;amp;utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+MicrosoftDownloadCenter+%28Microsoft+Download+Center%29&lt;/a&gt;. This page offers links to downloads of .chm files that describe the PowerShell cmdlets for SharePoint. 

  &lt;br /&gt;You can also get some help from the PowerShell console itself. For instance if you know that the command for creating a new site is New-SPSIte, but you don’t know what parameters you can use on that particular object, you can call the PowerShell help. It doesn’t matter whether you use capitals or not, PowerShell cmdlets are not case-sensitive.&lt;/p&gt;

&lt;pre&gt;	&lt;span style="color: #2b91af"&gt;get-help&lt;/span&gt; New-SPSite&lt;/pre&gt;

&lt;p&gt;This line of script will return the following information:&lt;/p&gt;
&lt;font face="courier new"&gt;
  &lt;p&gt;NAME 
    &lt;br /&gt;    New-SPSite 

    &lt;br /&gt;

    &lt;br /&gt;SYNOPSIS 

    &lt;br /&gt;    Creates a new site collection at the specified URL. 

    &lt;br /&gt;

    &lt;br /&gt;SYNTAX 

    &lt;br /&gt;    New-SPSite -Url &amp;lt;String&amp;gt; -OwnerAlias &amp;lt;String&amp;gt; [-AssignmentCollection &amp;lt;SPAssignmentCollection&amp;gt;] [-Confirm [&amp;lt;SwitchParameter&amp;gt;]] [-Con 

    &lt;br /&gt;    tentDatabase &amp;lt;SPContentDatabasePipeBind&amp;gt;] [-Description &amp;lt;String&amp;gt;] [-HostHeaderWebApplication &amp;lt;SPWebApplicationPipeBind&amp;gt;] [-Language 

    &lt;br /&gt;     &amp;lt;UInt32&amp;gt;] [-Name &amp;lt;String&amp;gt;] [-OwnerEmail &amp;lt;String&amp;gt;] [-QuotaTemplate &amp;lt;SPQuotaTemplatePipeBind&amp;gt;] [-SecondaryEmail &amp;lt;String&amp;gt;] [-Secondar 

    &lt;br /&gt;    yOwnerAlias &amp;lt;String&amp;gt;] [-SiteSubscription &amp;lt;SPSiteSubscriptionPipeBind&amp;gt;] [-Template &amp;lt;SPWebTemplatePipeBind&amp;gt;] [-WhatIf [&amp;lt;SwitchParamet 

    &lt;br /&gt;    er&amp;gt;]] [&amp;lt;CommonParameters&amp;gt;] 

    &lt;br /&gt;

    &lt;br /&gt;DESCRIPTION 

    &lt;br /&gt;    The New-SPSite cmdlet creates a new site collection with the URL and owner specified by the Url and OwnerAlias parameters.&lt;/p&gt;

  &lt;p&gt;RELATED LINKS &lt;/p&gt;

  &lt;p&gt;REMARKS 
    &lt;br /&gt;    To see the examples, type: "get-help New-SPSite -examples". 

    &lt;br /&gt;    For more information, type: "get-help New-SPSite -detailed". 

    &lt;br /&gt;    For technical information, type: "get-help New-SPSite -full".&lt;/p&gt;
&lt;/font&gt;

&lt;p /&gt;
If you want to see some examples or you want more information you can simply use the get-help cmdlet with the –examples, –detailed, or –full parameter.&lt;img src="http://sharepointchick.com/aggbug/75.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/75.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/75.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/75.aspx</trackback:ping>
    </entry>
    <entry>
        <title>A PowerShell script to automate the creation of SharePoint site collections</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/12/17/a-powershell-script-to-automate-the-creation-of-sharepoint-site.aspx" />
        <id>http://sharepointchick.com/archive/2009/12/17/a-powershell-script-to-automate-the-creation-of-sharepoint-site.aspx</id>
        <published>2009-12-17T15:06:03Z</published>
        <updated>2009-12-21T14:39:16Z</updated>
        <content type="html">&lt;p&gt;I must admit it. I’ve never really done anything with PowerShell.    &lt;br /&gt;Sure, the Macaw Solutions Factory is largely based on PowerShell, but I usually just use that as-is, or make minor changes to existing scripts.     &lt;br /&gt;So starting to work with PowerShell for SharePoint is all new. I read a PowerShell book over the summer holidays to get a little bit of an understanding about PowerShell, but as everyone knows, reading about it is very different from actually using it and doing it hands on. So last week I took my first baby steps in using SharePoint and PowerShell. If you’re a seasoned PowerShell user this post is probably not for you, but if you are, like me, just starting to get familiar with PowerShell you might find the information in here useful.&lt;/p&gt;  &lt;p&gt;The goal was to create site collections for everyone in our department. The urls of the site collections are the first names/account names of my team members and of course I didn’t want to type in the same lines 25 times.&lt;/p&gt;  &lt;pre&gt;&lt;div&gt;&lt;pre&gt;&lt;span style="color: teal"&gt;  1&lt;/span&gt; &lt;span style="color: #35687d"&gt;$snapin&lt;/span&gt; = &lt;span style="color: #2b91af"&gt;Get-PSSnapin&lt;/span&gt; | &lt;span style="color: blue"&gt;Where&lt;/span&gt;-Object {&lt;span style="color: #35687d"&gt;$_&lt;/span&gt;.Name -eq &lt;span style="color: maroon"&gt;'Microsoft.SharePoint.Powershell'&lt;/span&gt;}
&lt;span style="color: teal"&gt;  2&lt;/span&gt; 
&lt;span style="color: teal"&gt;  3&lt;/span&gt; &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: #35687d"&gt;$snapin&lt;/span&gt; -eq &lt;span style="color: #35687d"&gt;$null&lt;/span&gt;)
&lt;span style="color: teal"&gt;  4&lt;/span&gt; {
&lt;span style="color: teal"&gt;  5&lt;/span&gt;     &lt;span style="color: #2b91af"&gt;cd&lt;/span&gt; &lt;span style="color: maroon"&gt;'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration'&lt;/span&gt;
&lt;span style="color: teal"&gt;  6&lt;/span&gt;     .\SharePoint.ps1
&lt;span style="color: teal"&gt;  7&lt;/span&gt; }
&lt;span style="color: teal"&gt;  8&lt;/span&gt; 
&lt;span style="color: teal"&gt;  9&lt;/span&gt; &lt;span style="color: #35687d"&gt;$users&lt;/span&gt; = &lt;span style="color: maroon"&gt;"john"&lt;/span&gt;, &lt;span style="color: maroon"&gt;"paul"&lt;/span&gt;, &lt;span style="color: maroon"&gt;"mirjam"&lt;/span&gt;
&lt;span style="color: teal"&gt; 10&lt;/span&gt; 
&lt;span style="color: teal"&gt; 11&lt;/span&gt; &lt;span style="color: blue"&gt;foreach&lt;/span&gt; (&lt;span style="color: #35687d"&gt;$user&lt;/span&gt; &lt;span style="color: blue"&gt;in&lt;/span&gt; &lt;span style="color: #35687d"&gt;$users&lt;/span&gt;)
&lt;span style="color: teal"&gt; 12&lt;/span&gt; {
&lt;span style="color: teal"&gt; 13&lt;/span&gt;     New-SPSite -Url &lt;span style="color: maroon"&gt;"http://iws.macaw.nl/sites/$user"&lt;/span&gt; -OwnerAlias &lt;span style="color: maroon"&gt;"DOMAIN\$user"&lt;/span&gt; -Name &lt;span style="color: maroon"&gt;"Portal"&lt;/span&gt; -Template &lt;span style="color: maroon"&gt;"STS#0"&lt;/span&gt; 
&lt;span style="color: teal"&gt; 14&lt;/span&gt;     &lt;span style="color: #2b91af"&gt;Write-Output&lt;/span&gt; &lt;span style="color: maroon"&gt;"Site created for $user"&lt;/span&gt; 
&lt;span style="color: teal"&gt; 15&lt;/span&gt; } &lt;/pre&gt;&lt;/div&gt;&lt;/pre&gt;

&lt;p&gt;Before we can use the SharePoint PowerShell cmdlets we need to load the Microsoft.SharePoint.PowerShell snapin. We can accomplish this by loading the SharePoint.ps1 file or by adding the directly. If you try to add a snapin that is already added PowerShell will throw an error telling you that. Even though the script will continue after throwing the error without problems I didn’t like seeing the error, so I build in a test that checks if the snapin was already added. There might be a better way to test this, but I couldn’t find one, so I ended up filtering the collection of registered snapins on snapins with the name “Microsoft.SharePoint.PowerShell”. If the resulting collection contains an item (has more than 0 items in it) the snapin is already registered. &lt;/p&gt;

&lt;p&gt;[Update]: I adjusted the “if” statement according to the statement Leon posted in the comments (thanks Leon!). This test first gets the snapin where the name of the snapin equals Microsoft.SharePoint.PowerShell. It adds the results to the @snapin variable. Next the if statement checks whether there is actually a snapin in the @snapin variable, or whether it is NULL. As you can see in Leon’s script you can also choose to add the Microsoft.SharePoint.PowerShell snapin directly, but there is some other magic in the SharePoint.ps1 file and since I didn’t know what that was for I decided to just load the .ps1 file completely. &lt;/p&gt;

&lt;p&gt;Next I define an array of users. There are far more spiffy ways to do this, like for instance reading the names from a file, but I decided that this would do for now.&lt;/p&gt;

&lt;p&gt;Now we can loop through all users in the array and create a new site for each user. The urls of each site are &lt;a href="http://iws.macaw.nl/sites/[[username"&gt;http://iws.macaw.nl/sites/[[username&lt;/a&gt;]], so the url of my site is &lt;a href="http://iws.macaw.nl/sites/mirjam"&gt;http://iws.macaw.nl/sites/mirjam&lt;/a&gt;. Note how I use double quotes around the url. Because I use double quotes PowerShell replaces the variable name $user by its contents and uses that in the string. If you use single quotes PowerShell will leave the string alone and the url would be &lt;a href="http://iws.macaw.nl/sites/$user"&gt;http://iws.macaw.nl/sites/$user&lt;/a&gt;. The same principle is used for the owneralias and the output stating that the site for this user was created.&lt;/p&gt;

&lt;p&gt;I hope this helps people. If you have improvements or additions to the script feel free to post them in the comments!&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/74.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/74.aspx</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/74.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/74.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Site Locale and Calculated Columns in SharePoint 2007</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/11/25/site-locale-and-calculated-columns-in-sharepoint-2007.aspx" />
        <id>http://sharepointchick.com/archive/2009/11/25/site-locale-and-calculated-columns-in-sharepoint-2007.aspx</id>
        <published>2009-11-25T17:29:21Z</published>
        <updated>2009-11-25T17:29:21Z</updated>
        <content type="html">&lt;p&gt;I was looking into a problem with a calculated column in a SharePoint 2007 site.    &lt;br /&gt;On one environment the formula worked fine. On another, it kept throwing “The formula contains a syntax error or is not supported” errors.     &lt;br /&gt;The formula does something like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;=IF([Status]="Done",[Date Done]-[Due Date],"")&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Because I got this great error that told me exactly what was wrong I started troubleshooting by stripping the formula to eliminate possible causes till the formula looked like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;=IF([Status]="Done",1,2)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This still generated the same error message.&lt;/p&gt;  &lt;p&gt;After searching for a while I found the following post:   &lt;br /&gt;&lt;a title="http://www.hezser.de/blog/archive/2008/10/12/programmatically-creating-a-spfieldcalculated.aspx" href="http://www.hezser.de/blog/archive/2008/10/12/programmatically-creating-a-spfieldcalculated.aspx"&gt;http://www.hezser.de/blog/archive/2008/10/12/programmatically-creating-a-spfieldcalculated.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this post by René Hézser mentions the fact that he had a problem with an IF statement in a calculated column because his site locale was German. So I went back to check and indeed, on the environment where the formula threw the error the locale of the sites was Dutch. Changing the locale to English solved the problem, so with that the cause of the problem was clear. Unfortunately the locale of the environment is Dutch for a reason and the customer doesn’t want an English locale on their sites.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;But not to worry, after all, all I had to do was find out what the Dutch equivalent of =IF([Status]="Done",[Date Done]-[Due Date],"") was. After doing a Bing search I found out that the Dutch equivalent of IF in Excel is ALS, so I tried the formulas =ALS([Status]="Done",[Date Done]-[Due Date],"")  and =ALS([Status]="Done";[Date Done]-[Due Date];""), which both didn’t work.&lt;/p&gt;  &lt;p&gt;When I was about ready to give up I decided to change the site locale back to English, fill in the original formula and change the locale back to Dutch. Brilliant brainwave…after opening up the site column again the formula changed to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;=IF([Status]="Done";[Date Done]-[Due Date];"")&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So, if anyone is looking for the Dutch, or Nederlands, or 1043 (just trying to help out people searching for this here) equivalent of the IF statement in SharePoint 2007 it’s IF, but it uses ; instead of ,.&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/72.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/72.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/72.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/72.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Public betas of SharePoint 2010 and Office 2010 released</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/11/18/public-betas-of-sharepoint-2010-and-office-2010-released.aspx" />
        <id>http://sharepointchick.com/archive/2009/11/18/public-betas-of-sharepoint-2010-and-office-2010-released.aspx</id>
        <published>2009-11-18T18:04:55Z</published>
        <updated>2009-11-18T23:15:39Z</updated>
        <content type="html">&lt;p&gt;Today at the PDC in Los Angeles Kurt DelBene has announced the release of the public betas of SharePoint 2010 and Office 2010. &lt;br /&gt;
The betas can be downloaded at &lt;span style="LINE-HEIGHT: 115%; FONT-FAMILY: &amp;quot;Calibri&amp;quot;, &amp;quot;sans-serif&amp;quot;; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: NL; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;a href="http://bit.ly/ZC2010"&gt;http://bit.ly/ZC2010&lt;/a&gt; &lt;/span&gt;and include:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;SharePoint Server 2010&lt;/li&gt;
    &lt;li&gt;Office 2010&lt;/li&gt;
    &lt;li&gt;Visio 2010&lt;/li&gt;
    &lt;li&gt;Project 2010&lt;/li&gt;
    &lt;li&gt;Office Mobile 2010&lt;/li&gt;
    &lt;li&gt;Office Web Applications&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are two things that are new to these releases (apart from a s**t-load of fixes compared to Technical Preview versions).&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;The &lt;strong&gt;Outlook Social Connector&lt;/strong&gt; feeds information about people directly into Outlook. Integration with SharePoint 2010 is out-of-the-box, user profile information, a contact’s photo and information from the My Site of the author is shown when an email is selected. The social connector also comes with an SDK allowing developers to build connectors with third party social networks. The LinkedIn connector (build by LinkedIn) is expected to be released early next year.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Office Mobile 2010&lt;/strong&gt; public beta is part of the Microsoft campaign to deliver a great user experience of Microsoft products across the PC, phone and  browser and offers a version of Office optimized for use on Windows Mobile 6.5 phones.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Personally I’m most interested in the SharePoint 2010 beta. If you are too, make sure you read &lt;a target="_blank" href="http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx"&gt;these guidelines&lt;/a&gt; by Jie Li before you start installing! &lt;br /&gt;
The most important fact in there is that, at the moment, SharePoint 2010 doesn’t work on Windows Server 2008 R2 without a hotfix. Unfortunately the hotfix hasn’t been released yet, and without it the SharePoint Service Applications won’t work. This means that for the moment, you have to choose between waiting for the hotfix to become available and installing SharePoint 2010 on Windows Server 2008 SP2 for now.&lt;/p&gt;
&lt;p&gt;Having said that, there are plenty of reasons to install SharePoint 2010 and start playing around with it. &lt;br /&gt;
Some of the coolest features are:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Document sets&lt;/li&gt;
    &lt;li&gt;Enterprise wide metadata&lt;/li&gt;
    &lt;li&gt;Lots of new search features (even without the FAST integration)&lt;/li&gt;
    &lt;li&gt;Great new development tools in Visual Studio 2010 for SharePoint 2010 (and I do mean great!)&lt;/li&gt;
    &lt;li&gt;Social networking with, among other things, tagging, rating and improved people search&lt;/li&gt;
    &lt;li&gt;Off-loading blob storage using SQL Server Remote Blob Storage (RBS)&lt;/li&gt;
    &lt;li&gt;New client object models&lt;/li&gt;
    &lt;li&gt;Business Connectivity Services, this is the old 2007 Business Data Catalog, that has had a major makeover and that is improved hugely&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And many other cool new features…&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/71.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/71.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/71.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/71.aspx</trackback:ping>
    </entry>
    <entry>
        <title>SQL Server essentials for SharePoint (1)</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/11/16/sql-server-essentials-for-sharepoint-1.aspx" />
        <id>http://sharepointchick.com/archive/2009/11/16/sql-server-essentials-for-sharepoint-1.aspx</id>
        <published>2009-11-16T11:46:48Z</published>
        <updated>2009-11-16T12:04:54Z</updated>
        <content type="html">&lt;p&gt;SQL Server is an essential part of every SharePoint environment. Since the vast majority of SharePoint data is stored in a SQL Server database your SharePoint environment can never be faster than the speed at which SQL Server can handle the requests. Unfortunately most people installing and maintaining SharePoint databases aren’t trained SQL administrators. They usually are SharePoint administrators, or even SharePoint developers (like me). This means that on a lot of SharePoint environments performance isn’t what it could be, due to poor or nonexistent SQL Server management.    &lt;br /&gt;In this series I will list a few simple things that you can do to get more out of your SQL Server and SharePoint environment. I won’t explain the why of every tip, but I will focus on the how you can make your SharePoint environment faster and more stable by improving your SQL Server management. Some of the tips and tricks will only be relevant if you have multiple servers and a large budget, but other tips can be beneficial to even the smallest installations. The series is not intended to be the last word on SQL Server for SharePoint, but rather useful information, hints and tips for getting more out of your database platform.&lt;/p&gt;  &lt;p&gt;This first post will talk about things you do before and while installing SQL Server. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Installing SQL Server&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first pieces of guidance is very straightforward and needs to be considered even before you start installing SQL Server. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;For a production environment you should always run SQL Server on a separate physical server. Single server environments (where SQL Server and SharePoint are installed on the same server) can be used as development or test environments, but are not suitable for production and user acceptance environments. &lt;/li&gt;    &lt;li&gt;Another tip for production and user acceptance environments; make sure you have at least 4GB of memory per processor in your SQL Server box. &lt;/li&gt; &lt;/ul&gt; Understand that SharePoint uses several different databases and that they all have different purposes and uses.   &lt;p /&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;Configuration Database (Config DB).&lt;/strong&gt;         &lt;br /&gt;Stores information about your SharePoint environment like server names and Web Application URLs and a site collection list with names and URLs. This database isn’t used very heavily during normal operations. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Content Databases (Content DB).&lt;/strong&gt;         &lt;br /&gt;There is at least one Content Database per Web Application. Stores all data about site collections, sub sites, list, libraries and items. Data stored in the environment by end users ends up in (one of the) content database(s). In a collaboration environment content databases should be optimized for writing, in a web content management environment content databases should be optimized for reading. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Central Administration Content DB.&lt;/strong&gt;         &lt;br /&gt;Stores content for the Central Administration Web Application. It is generally not recommended to store large amounts of data in here (e.g. TechNet documents). &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Shared Services Provider Database (SSP DB).&lt;/strong&gt;         &lt;br /&gt;Stores configuration data for the Shared Services Provider (there is one DB per SSP), and also all User Profiles, Audiences, Excel Trusted File Locations etc. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Shared Services Provider Search Database (SSP Search DB).&lt;/strong&gt;         &lt;br /&gt;Stores crawled and managed properties identified and indexed by MOSS search. This database also stores information about which users have access to what content. Depending on your crawl schedule and the use of your environment the use of this database can be both read and write intensive. Note that the content index is *not* stored in this database but rather on the file system of the Index and Query servers. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;SSP Admin Content Database (SSP Admin Content DB).&lt;/strong&gt;         &lt;br /&gt;Stores content for the SSP Administration Web Application (there is one DB per SSP). It is generally not recommended to store large amounts of data in here, or to use the SSP Web Application and database for hosting My Sites. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Windows SharePoint Services Search Database&lt;/strong&gt;&lt;strong&gt; (WSS Search DB).&lt;/strong&gt;         &lt;br /&gt;This database stores the full text index of content in a WSS only deployment. In the case of MOSS only the full text index of the SharePoint help files are stored in the WSS Search DB. This database is not required in a MOSS deployment, unless help search is needed. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Single Sign On Credential Store DB (SSO DB).&lt;/strong&gt;         &lt;br /&gt;Optional is using the MOSS SSO capability. Stores the credential cache for SSO applications. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;TempDB&lt;/strong&gt;.         &lt;br /&gt;TempDB is SQL Server System database that is heavily used by SharePoint as an intermediate database for writing information to any of the SharePoint databases. Because of this, TempDB is very read and write intensive. A slow TempDB will cause all write actions to all SharePoint databases to be slow as well. &lt;/li&gt;   &lt;/ul&gt;  &lt;p&gt;  &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RAID&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Next you need to start thinking about the appropriate RAID configurations for the disks you’re going to store your SQL Server installation and databases on.    &lt;br /&gt;RAID (Redundant Array of Independent Disks) is a disk system that contains multiple disk drives, called an array, to provide greater performance, reliability, storage capacity, and lower cost. There are several different types of RAID arrays and each type is called a level. Each level uses a different algorithm to implement fault tolerance. The most common RAID levels are 0, 1, 5 and 1+0, which are also the levels that are used for SharePoint. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;RAID 0 is also known as disk striping. Two or more disks are used for a RAID 0 configuration. All data and programs that are installed on a server using RAID 0 are divided in blocks and are equally distributed across all disks. This means that RAID 0 improves the read and write performance and uses all available disk capacity. A downside is that there is no fault tolerance. If one of the disks crashes you lose the data that was stored on it. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="RAID 0" border="0" alt="RAID 0" src="http://sharepointchick.com/images/sharepointchick_com/WindowsLiveWriter/SQLEssentialsforSharePoint_F490/raid0_3.gif" width="212" height="177" /&gt;  &lt;br /&gt;RAID 0&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;RAID 1 is called disk mirroring because  all disks have an identical mirror disk. All data that is written to the primary disk is written to the mirror disk as well. This means that RAID 1 provides fault tolerance. It also means that effectively you can only use half of your disk capacity for storage and that write actions will be slower as data has to be written to two locations, instead of just one location. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="RAID 1" border="0" alt="RAID 1" src="http://sharepointchick.com/images/sharepointchick_com/WindowsLiveWriter/SQLEssentialsforSharePoint_F490/raid1_3.gif" width="109" height="177" /&gt;  &lt;br /&gt;RAID 1&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;RAID 5 is known as striping with parity. When using RAID 5 you will need at least three disks. All information is split in blocks, where half of each block is stored on a certain drive, and the other half of that block is stored on another drive. The third drive stores the parity information. If one of the first two drives fails the parity information can be used to reconstruct the missing data. This means that RAID 5 provides fault tolerance without storing all information twice. The downside is that you need at least three disks and that writing information is slower, because the parity has to be adjusted every time data is written to a disk. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="raid5" border="0" alt="raid5" src="http://sharepointchick.com/images/sharepointchick_com/WindowsLiveWriter/SQLEssentialsforSharePoint_F490/raid5_3.gif" width="385" height="209" /&gt;  &lt;br /&gt;RAID 5&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;RAID 1+0 or RAID 10 is also called mirroring with striping. RAID 10 uses a striped array of disks like the one used for RAID 0 and then mirrors that like in RAID 1 (hence the name, RAID 1+0). For example if you have a striped array of two disks than that set of disks is mirrored on two other striped disks. RAID 10 provides both good reading performance and fault tolerance. The downsides of RAID 10 are that you need at least four disks, that you can only use half of your disk space for storage and that writing will be a bit slower because all data gets stored twice. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The more physical volumes you have, the better it is. If you can separate anything out onto separate disks, you should do so in the following order: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The first disk can be RAID 1 and will be used to store the operating system and SQL installation files on. If you only have 1 disk, don’t let it be RAID 1, but try and make it RAID 10 or 5. &lt;/li&gt;    &lt;li&gt;If you can separate one thing out from the rest make it TempDB, as SharePoint writes to and reads from TempDB all the time. Your SharePoint installation can’t be faster than your TempDB. The disk that you store TempDB on should be a RAID 10 disk &lt;/li&gt;    &lt;li&gt;If you have another disk, use this one for the SQL transaction logs and make this disk also a RAID 10. &lt;/li&gt;    &lt;li&gt;In the case you have a fourth disk use this one for the SQL data files. This one should also be RAID 10. If your environment is read intensive, like an Internet presence site, where not a lot data is written to SQL you should separate out the SQL data files before the transaction log files, as the transaction log is only used when data is written to SQL and not when data is read from SQL. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Should you be in the lucky situation where you have more than four disks separate out the log and data files for the separate databases. Start by separating out the search database and the content databases, go for the SSP database after that. &lt;/p&gt;  &lt;p&gt;If you have a choice, use more smaller and faster drives, instead of having less larger drives. &lt;/p&gt;  &lt;p&gt;If you have to prioritize among faster disks use the following ranking order:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SQL TempDB data and transaction log files &lt;/li&gt;    &lt;li&gt;Database transaction log files &lt;/li&gt;    &lt;li&gt;Search database &lt;/li&gt;    &lt;li&gt;Content databases &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;While installing SQL&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;While you are running the SQL Server install wizard make sure you check the following things:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;You need to install the SQL Agent &lt;/li&gt;    &lt;li&gt;Select windows authentication (SQL authentication is evil) &lt;/li&gt;    &lt;li&gt;When choosing collation settings select LATIN1_General_CI_AS_KS_WS      &lt;ul&gt;       &lt;li&gt;Accent-sensitive &lt;/li&gt;        &lt;li&gt;Kana-sensitive &lt;/li&gt;        &lt;li&gt;Width-sensitive &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Go to the Surface area configuration and click DB Engine. Make sure that remote connections are allowed &lt;/li&gt;    &lt;li&gt;Select TPC/IP and Named Pipes &lt;/li&gt;    &lt;li&gt;Configure SQL Server and SQL Server Agent using a regular Domain Service Account, do not use and Administrator or your SharePoint Farm Account as the SQL Server Service Account &lt;/li&gt;    &lt;li&gt;Double check to make sure that the SQL Agent starts automatically &lt;/li&gt;    &lt;li&gt;You don't need the browser, so don’t install it &lt;/li&gt;    &lt;li&gt;Also don’t install Analysis Services or Reporting Services on the machine(s) hosting your SharePoint databases &lt;/li&gt;    &lt;li&gt;Don’t install any other components that you don’t need &lt;/li&gt;    &lt;li&gt;Restart SQL Server service &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Database sizing&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A database is build up out of several smaller components.  &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Databases consists of filegroups &lt;/li&gt;    &lt;li&gt;Filegroups consist of files &lt;/li&gt;    &lt;li&gt;Files consist of extents &lt;/li&gt;    &lt;li&gt;Extents consist of pages &lt;/li&gt;    &lt;li&gt;Pages consist of data &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The size of a page is always 8kB and since an extent consists of 8 pages an extent is 64kB. Because of this you should format your RAID array using 64kB blocks. &lt;/p&gt;  &lt;p&gt;To get an optimal performance and to minimize fragmentation you should always pre-grow your data and log files. If you are unsure of the total amount of space you need to allocate for a database or a log it’s ok to over-allocate. Even if you have pre-allocated space you need to leave auto-growth on, just to make sure that your SharePoint environment doesn’t grind to a hold should your database reach the size you pre-grew it to. Do set auto-growth to fixed amounts, not to percentages, to prevent your database from growing out of control. Keep monitoring your SQL environment to make sure that the size of your data and log files doesn’t get out of hand and that your hard drive doesn’t run out of space.&lt;/p&gt;  &lt;p&gt;If you pre-allocate space for you log files the most ideal way to do this will in most cases be by allocating 8GB at the time. If your database is smaller than 8GB you probably will want to grow your log files by using smaller amounts.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Other advice&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Your database server is the least ideal candidate of all SharePoint server types to be virtualized because SQL has the highest amount of disk I/O activity and can often have high memory and processor requirements.&lt;/p&gt;  &lt;p&gt;The biggest database throughput killers are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;TempDB performance &lt;/li&gt;    &lt;li&gt;Slow disk IO. The advice is to use at least 15,000 RPM disks &lt;/li&gt;    &lt;li&gt;Inadequate memory. This will prevent SQL Server’s ability to cache data. &lt;/li&gt; &lt;/ol&gt;&lt;img src="http://sharepointchick.com/aggbug/70.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/70.aspx</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/70.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/70.aspx</trackback:ping>
    </entry>
    <entry>
        <title>[Dutch] SDN Event in Houten op 14 december</title>
        <link rel="alternate" type="text/html" href="http://sharepointchick.com/archive/2009/11/12/dutch-sdn-event-in-houten-op-14-december.aspx" />
        <id>http://sharepointchick.com/archive/2009/11/12/dutch-sdn-event-in-houten-op-14-december.aspx</id>
        <published>2009-11-12T23:35:54Z</published>
        <updated>2009-11-12T23:50:43Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;  &lt;p&gt;Op 14 december is er weer een SDN event in Houten en we hebben vier hele interessante presentaties over SharePoint 2010!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="80%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="15%"&gt;Spreker&lt;/td&gt;        &lt;td valign="top" width="25%"&gt;Titel&lt;/td&gt;        &lt;td valign="top" width="60%"&gt;Omschrijving&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="15%"&gt;Ton Stegeman&lt;/td&gt;        &lt;td valign="top" width="25%"&gt;Aan de slag met de SharePoint 2010 Client object modellen&lt;/td&gt;        &lt;td valign="top" width="60%"&gt;De komst van SharePoint 2010 brengt voor ontwikkelaars een aantal interessante nieuwe ontwikkelingen. Een daarvan is het beschikbaar komen van drie nieuwe object modellen. Hiermee krijgen ontwikkelaars de beschikking over een SharePoint object model op de client. Dit maakt de ontwikkeling van SharePoint client applicaties een stuk eenvoudiger. Bovendien schept het nieuwe mogelijkheden voor software ontwikkeling voor hosted SharePoint omgevingen als SharePoint Online. Er is een .NET managed SharePoint API, om .NET applicaties te bouwen. Daarnaast is er een object model voor Silverlight en is er een javascript library. In deze sessie zal Ton Stegeman een aantal voorbeelden laten zien van ieder object model. Daarbij zal hij laten zien hoe het onwikkelen met een client API verschilt van het onwikkelen op basis van het server object model. De voorbeelden bevatten een aantal praktische tips, die je helpen na de sessie zelf snel aan de slag te gaan met deze interessante nieuwe ontwikkeling.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="15%"&gt;Robert Jaakke&lt;/td&gt;        &lt;td valign="top" width="25%"&gt;Sandboxed Solutions&lt;/td&gt;        &lt;td valign="top" width="60%"&gt;SharePoint 2010 heeft een nieuw deployment model genaamd Sandboxed Solutions. Sandboxed Solutions zorgen er voor dat de risico’s die custom  code met zich mee brengen geminimaliseert worden.          &lt;br /&gt;De Farm Administrator kan dit beheren door de beschikbare API’s te beperken en resources quota’s op te leggen. Door deze maatregelen kunnen Sandboxed Solutions ook goed in een shared hosting omgeving gebruikt worden. In deze sessie bespreek ik wat Sandboxed solutions zijn, hoe je ze maakt en wat de geavanceerde technieken zijn om het maximale er uit te halen.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="15%"&gt;Joran Markx&lt;/td&gt;        &lt;td valign="top" width="25%"&gt;Het SharePoint 2010 Developer Platform&lt;/td&gt;        &lt;td valign="top" width="60%"&gt;Deze sessie geeft een overzicht van de nieuwe mogelijkheden voor developers in SharePoint 2010. Er zal ingegaan worden op het bouwen van applicaties bovenop het SharePoint platform met behulp van de nieuw beschikbare tools in Visual Studio 2010. In deze sessie zal er met codevoorbeelden en demos worden gekeken naar de nieuwe features voor het bouwen van user interfaces, data access en andere programmeerfunctionaliteiten.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="15%"&gt;Andries den Haan&lt;/td&gt;        &lt;td valign="top" width="25%"&gt;Social innovations for knowledge sharing in SharePoint 2010&lt;/td&gt;        &lt;td valign="top" width="60%"&gt;Review van de social capabilities in het SharePoint 2010 platform in de context van het kennisdelingsprogramma bij Getronics Consulting.          &lt;p&gt;De sessie bestaat uit 2 delen:            &lt;br /&gt;•    Toelichting op het kennisdelingsprogramma (achtergrond en historie, visie en doelstellingen, status, lessons learned)             &lt;br /&gt;•    Innovaties in SharePoint 2010 tbv kennisdeling en networking: O.a. aandacht voor innovaties van de enterprise wiki’s, activity feeds (extensibility), profiles en social tagging, social search &lt;/p&gt;          &lt;p&gt;Als onderdeel van de sessie zal een demo worden gegeven van OOB functionaliteit in het nieuwe platform .&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Schrijf je in op de &lt;a href="http://www.sdn.nl/SDN/SDNEvent/SDNEventdecember2009/tabid/132/Default.aspx" target="_blank"&gt;SDN website&lt;/a&gt;, dan zie ik je de 14de in Houten!&lt;/p&gt;&lt;img src="http://sharepointchick.com/aggbug/69.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://sharepointchick.com/comments/69.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://sharepointchick.com/comments/commentRss/69.aspx</wfw:commentRss>
        <trackback:ping>http://sharepointchick.com/services/trackbacks/69.aspx</trackback:ping>
    </entry>
</feed>