<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">SharePoint Brew</title><subtitle type="html">Russmax [MSFT] weblog</subtitle><id>http://blogs.msdn.com/russmax/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/russmax/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-02-09T02:19:00Z</updated><entry><title>Why are my blog post showing up in different places?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/12/18/why-are-my-blogs-showing-up-in-different-places.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/12/18/why-are-my-blogs-showing-up-in-different-places.aspx</id><published>2009-12-18T00:38:00Z</published><updated>2009-12-18T00:38:00Z</updated><content type="html">&lt;P&gt;&lt;FONT size=2&gt;I will be moving a good portion of my blogs as well as any new ones over to our new SharePoint Escalation Services Team blog.&amp;nbsp; We think it’s a good idea to get our blogs more consolidated.&amp;nbsp; This also ensures that blog content is mostly coming from Microsoft Support Escalation Engineers and Escalation Engineer’s.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Check out the blog here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/spses" mce_href="http://blogs.msdn.com/spses"&gt;http://blogs.msdn.com/spses&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I’ll still be posting my blog content here as well but just wanted to put this on your radar…&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9938487" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Logging Improvements – Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/12/18/sharepoint-2010-logging-improvements-part-1.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/12/18/sharepoint-2010-logging-improvements-part-1.aspx</id><published>2009-12-18T00:18:00Z</published><updated>2009-12-18T00:18:00Z</updated><content type="html">&lt;P&gt;Part 1 of this blog will describe ULS and Event log improvements and what you need to know. The new changes simplify troubleshooting and provide the Administrator more flexibility in managing different aspects of ULS logging. I will expand on this topic in Part 2 and will discuss Developer Dashboard. A special shout-out goes to Dan Winter for the knowledge transfer and technical review.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Correlation ID&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;A deep investment has been made to improve Correlation ID in SharePoint 2010. Events such as page loads and other common events within ULS logs have a corresponding Correlation ID. This ID is grouped with other events based on the same conversation. For example, User A hits a WFE and accesses a site. All the events in the ULS logs that correlate with User A’s login all share the same correlation ID. This makes mining the ULS logs easy in that you can filter based on correlation ID. If the conversation hits multiple servers in the farm, those other servers maintain the exact same correlation ID. A common scenario for this is when a WFE is calling a web service on an application server. It’s also possible to filter on Correlation ID via a SQL profiler trace so you can truly get a farm wide picture of what happened at each level of the conversation. SharePoint error pages also expose a correlation ID along with time stamp of the error so now it’s simple to find the conversation in the servers corresponding ULS logs. &lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image002_thumb.jpg" width=244 height=116 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Event Throttling&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;ULS and Event logging now has a richer category based management in that you can set specific subcategories to a unique level of logging while throttling other subcategories that belong to same root category.&lt;/P&gt;
&lt;P&gt;For Example, troubleshooting query processor, turn up verbose on query processor component:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image004_thumb.jpg" width=244 height=127 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In the example above, the root category is bold it flags an administrator when unique logging has been set within a root category. Also, note the different logging levels which can be set on each sub category.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the issue has been resolved or custom logging levels are no longer required, you can now set logging back to default:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image006_thumb.jpg" width=244 height=82 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Log File Retention&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;In SharePoint 2007, the default log file retention policy was to set log files to generate once every 30 minutes with a total of 96 log files at any given time. This equates to 48 hours. ULS logging has been improved by reducing log file size by at least 50 %. This allows a completely new approach to setting log file retention policy. The default setting is now at # of days with the default being 14. A new option exists to restrict trace logs to a fixed disk size. This is unchecked by default.&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image008_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image008_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image008 border=0 alt=clip_image008 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image008_thumb.jpg" width=244 height=167 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image008_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Once day 15 hits, log files from day 1 are pruned. If restrict trace log setting is enforced to a fixed disk size, then both settings are enforced. The order on which the settings are enforced is dependent upon which condition is hit first. &lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Number of days to store log files: 14&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Restrict trace log disk space usage: 2 GB &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;SharePoint administrator is chasing a problem and cranks up some verbose logging due to profile provision problem. This causes the total ULS logs size to hit 2 GB on day 3. In this case, the oldest logs are pruned to honor the restrict trace log setting. These settings are configurable via the &lt;B&gt;Set-SPDiagnosticConfig &lt;/B&gt;cmdlet.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note: &lt;/B&gt;The highest level you can set the trace log disk space usage is 1 TB.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Event Log Flood Protection&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The name says it all. This feature will prevent one event from flooding the event log. This is enabled by default within diagnostics logging:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image010_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image010_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image010 border=0 alt=clip_image010 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image010_thumb.jpg" width=244 height=34 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image010_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;With this option enabled, if the same event fires 5 times within 2 minutes, we will suppress the event from logging and throw a summary event at the 2 minute mark with a nice description of how many times the event actually fired. This is the default behavior and can be customized using PowerShell via the &lt;B&gt;Set-SPDiagnosticConfig&lt;/B&gt; cmdlet.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; To qualify has the same event is an event with the same event source and ID. The event severity and/or text doesn’t apply and is not checked.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Manage logging using PowerShell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;A more hardcore SharePoint administrator is likely to use PowerShell for all administration including managing ULS logs. The PG has given us a very rich set of command-lets to do things like get\set diagnostic levels and retention policies. It’s possible to mine ULS logs using PowerShell for monitoring or troubleshooting purposes. I’ll discuss each area below and provide some examples.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Retrieve logging levels&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The following cmdlet retrieves logging levels:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogLevel – &lt;/I&gt;&lt;/B&gt;&lt;I&gt;Displays a list of objects or diagnostic levels&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;The cmdlet pulls all logging levels but what if you wanted to filter this result by area or specific category?&lt;/P&gt;
&lt;P&gt;Examples:&lt;/P&gt;
&lt;P&gt;To retrieve all logging categories by area “WSS Search Diagnostics”:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogLevel –identity “WSS Search Diagnostics:*” | FL&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;To retrieve a specific logging category like Query Processor within the WSS Search Diagnostic area:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SpLogLevel –identity “WSS Search Diagnostics:Query Processor” | FL&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Set logging levels&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The following cmdlet sets logging levels:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Set-SPLogLevel - &lt;/I&gt;&lt;/B&gt;&lt;I&gt;Sets trace logging and event logging levels to a category&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note: &lt;/B&gt;No parameters are set to required but you still need parameters to correctly set logging levels&lt;/P&gt;
&lt;P&gt;Examples:&lt;/P&gt;
&lt;P&gt;To set the entire area “WSS Search Diagnostics” to event log level of monitorable and trace level to verbose:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Warning –Identity “WSS Search Diagnostics:*” &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It’s possible set a specific category within an Area. For Example, setting Query Processor to verbose within WSS Search Diagnostics:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Warning –Identity “WSS Search Diagnostics:Query Processor” &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; Logging levels can be reset back to default level using &lt;B&gt;&lt;I&gt;Clear-SPLoglevel&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Creating and Merging Log files&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It’s possible to force a new uls log to be created by running &lt;B&gt;&lt;I&gt;new-splogfile&lt;/I&gt;&lt;/B&gt;. This will end the current log file and start a new one. This is valuable when attempting to reproduce a problem and want to minimize the total size of the log file. &lt;B&gt;&lt;I&gt;Merge-SPLogFile&lt;/I&gt;&lt;/B&gt; combines trace log entries from all farm computers into a single log file on the local computer. It does this by creating a one-time timer job and executing it to create the merged log. This is extremely valuable if you are tracking an issue and suspect it’s hitting multiple servers in a farm. Since the conversation across multiple servers will contain the exact same correlation ID, the &lt;B&gt;merge-splogfile &lt;/B&gt;becomes a powerful cmdlet for troubleshooting.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Some examples of Merge-SPLogFile:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The preceding example merges the last hour of log data from all farm computers with no filtering.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Area Search&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The preceding example merges the last hour of log data from the Search area&lt;/P&gt;
&lt;P&gt;Additional parameters are available to tune results. For Example, looking for something specific in the ULS message you can filter results using the Message parameter.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Mining ULS Logs via PowerShell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It’s possible to view ULS log entries using the &lt;B&gt;&lt;I&gt;Get-SPLogEvent&lt;/I&gt;&lt;/B&gt; cmdlet. At beta 2, Running this cmdlet by itself retrieves every event from every ULS log within the directory hosting ULS logs. Some examples of running Get-SPLogEvent:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 1:&lt;/B&gt; ULS log or logs are moved to a different directory named “newpath”, run the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogEvent –Directory “C:\newpath”&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 2:&lt;/B&gt; Retrieve all the events within a certain time period run the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogEvent -StartTime "12/04/2007 17:00" -EndTime "12/04/2007 18:00"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 3: &lt;/B&gt;Retrieve the first 10 events and last 2 events from logs directory:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogEvent | select –first 10 –last 2&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 4&lt;/B&gt;: Retrieve all events with same correlation ID:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image012_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image012_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image012 border=0 alt=clip_image012 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image012_thumb.jpg" width=244 height=64 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image012_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Notice the message: “Warning: column “Message” does not fit into the display and was removed.&lt;/P&gt;
&lt;P&gt;You can include the message by performing the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image014_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image014_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image014 border=0 alt=clip_image014 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image014_thumb.jpg" width=244 height=105 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010LoggingImprovementsPart1_10178/clip_image014_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note: &lt;/B&gt;The more columns you include, the more difficult it is to read the message because it wraps.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Example 5&lt;/B&gt;: Retrieve all events based on a specified level.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-SPLogEvent | ?{$_.level –eq “critical”}&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9938481" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>Tips for User Profile Service Application provisioning with SharePoint 2010 Beta 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/12/09/tips-for-user-profile-service-application-provisioning-with-sharepoint-2010-beta-2.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/12/09/tips-for-user-profile-service-application-provisioning-with-sharepoint-2010-beta-2.aspx</id><published>2009-12-09T21:04:53Z</published><updated>2009-12-09T21:04:53Z</updated><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is just another blog of many discussing some tips to provisioning User Profile Service Application. I refer to User Profile Service Application as UPA in this blog. The bottom of this blog will contain some links to walk you through the process. Things have improved greatly in Beta 2 but you can get caught up in frustrating problems provisioning the UPA. This can often lead to serious confusion on what exact account permissions are required for successful UPA provisioning. This blog is specifically written after testing with Beta 2. At RTM, this may not be 100 % accurate.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The basic steps are the following:&lt;/p&gt;  &lt;p&gt;1. Provision a UPA either through the Farm Configuration Wizard or from Manage Service Application page within Central Administrator.&lt;/p&gt;  &lt;p&gt;2. Start the &amp;quot;User Profile Synchronization Service&amp;quot; within Central Administrator\System Settings\Manage services on server&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: This must show in a started state before continuing&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;3. Within Central Administrator, Application Management, and select User Profile Service Application. Click Manage button from the Ribbon.&lt;/p&gt;  &lt;p&gt;4. Click Configure Synchronization Connections and click Create New Connection&lt;/p&gt;  &lt;p&gt;5. Fill out the fields and for Forest Name specify the FQDN of the DC you want to use. Keep it on Auto discover domain controller. The account name specified must have &amp;quot;Replicate Directory Changes&amp;quot; permission. Populate Container and choose which OU's that will participate and hit OK.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Permission Requirements for UPA provisioning&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The next hot topic is what account should I use to provision a UPA and what permissions are required? At beta 2, you must use the same account used when you installed SharePoint 2010. This is referred to as the farm service account. This account is automatically added to the Central Administrator’s application pool identity and will run the timer service. If you’re not sure which account is the farm service account, then the easy way to verify is to look at the Central Application Pool identity or account used to run the timer service.&lt;/p&gt;  &lt;p&gt;Here is a quick re-hash of the account requirements before starting UPA provisioning:&lt;/p&gt;  &lt;p&gt;1. User account is the same account that was used to install SharePoint 2010&lt;/p&gt;  &lt;p&gt;2. User account is a member of Farm Administrator group within Central Administrator&lt;/p&gt;  &lt;p&gt;3. User account is added to local administrator group&lt;/p&gt;  &lt;p&gt;4. User account is added to sysadmin role on SQL server&lt;/p&gt;  &lt;p&gt;5. User account is allowed by policy to log on locally to the server where Profile Synchronization will be deployed &lt;/p&gt;  &lt;p&gt;6. User account is at least member of the domain’s Pre-Windows 2000 Compatible Access group.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Note: If the user is a domain administrator, membership to this group isn’t required&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;7. User account specified to perform a profile import requires &amp;quot;Replicate Directory Changes&amp;quot; permission.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;For more information on this see the following:&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/11/18/path-to-user-profile-synchronization-success-in-sharepoint-2010-beta.aspx"&gt;http://blogs.msdn.com/sharepoint/archive/2009/11/18/path-to-user-profile-synchronization-success-in-sharepoint-2010-beta.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9934815" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>PowerShell Intro for SharePoint Administrators - Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/11/19/powershell-intro-for-sharepoint-administrators-part-2.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/11/19/powershell-intro-for-sharepoint-administrators-part-2.aspx</id><published>2009-11-19T21:05:00Z</published><updated>2009-11-19T21:05:00Z</updated><content type="html">&lt;P&gt;PowerShell has a rich set of advanced features that provide an Administrator with a multitude of options depending on what they would like to do. This nugget will take a more focused look into the many ways objects can be used. Remember, an object in this case is a variable. From Part 1 of this nugget, you know that variables are objects that hold something. This nugget will conclude with some PowerShell scripting basics. Thanks goes to Sheyi for providing a technical review.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;PipeBind&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;PipeBind is a concept where a parameter accepts an object “variable” of a specific type. If you look at the syntax of get-help new-spsite –full, you will discover some parameters accept pipe bind:&lt;/P&gt;
&lt;P&gt;&lt;I&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;]] [-ContentDatabase &lt;B&gt;&amp;lt;SPContentDatabasePipeBind&amp;gt;&lt;/B&gt;] [-Description &amp;lt;String&amp;gt;] [-HostHeaderWebApplication &lt;B&gt;&amp;lt;SPWebApplicationPipeBind&amp;gt;&lt;/B&gt;] [-Language &amp;lt;UInt32&amp;gt;] [-Name &amp;lt;String&amp;gt;] [-OwnerEmail &amp;lt;String&amp;gt;] [-QuotaTemplate &lt;B&gt;&amp;lt;SPQuotaTemplatePipeBind&amp;gt;&lt;/B&gt;] [-SecondaryEmail &amp;lt;String&amp;gt;] [-SecondaryOwnerAlias &amp;lt;String&amp;gt;] [-SiteSubscription &lt;B&gt;&amp;lt;SPSiteSubscriptionPipeBind&amp;gt;&lt;/B&gt;] [-Template &lt;B&gt;&amp;lt;SPWebTemplatePipeBind&amp;gt;&lt;/B&gt;] [-WhatIf [&amp;lt;SwitchParameter&amp;gt;]] [&amp;lt;CommonParameters&amp;gt;] &lt;BR&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;In this example, there are several parameters that accept pipe binds. Here is an example of passing a variable to the template parameter which accepts a pipe bind.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$tem = get-spwebtemplate –identity STS#0&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;New-spsite –url &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/" mce_href="http://contosoweb"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; –owneralias contoso\administrator –name contososite –template $tem&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Properties and Methods&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Variables have properties and method’s available based on the type of the variable. For example, declaring a variable and assigning it a web application will contain all properties and functions for type SPWebApplication. To view all of the available properties and methods, you can pipeline the get-member cmdlet.&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web = get-spwebapplication&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web | get-member&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image002_thumb.jpg" width=244 height=113 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image004_thumb.jpg" width=244 height=67 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; This is not a complete list of all method’s and properties available for this type.&lt;/P&gt;
&lt;P&gt;It’s possible to add conditions to get more desirable results. For Example, you can use the where alias if you just want to see a specific member type. To view only members of type Method punch in the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web | get-member | where {$_.MemberType –eq “Method”}&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Note: It is possible to do more than one pipeline J&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Viewing Properties&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Before updating and viewing specific properties of an object, it’s important to know how to first view all properties and there corresponding values. By default, only a few properties are exposed by simply printing a variable.&lt;/P&gt;
&lt;P&gt;For Example: &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image006_thumb.jpg" width=244 height=65 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/B&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use get-object cmdlet to view all properties of a given object. An alias for the get-object cmdlet is available called select which is what I prefer to use. &lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image008_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image008_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image008 border=0 alt=clip_image008 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image008_thumb.jpg" width=244 height=126 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image008_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; Another option to view all properties of a given object is available.&lt;/P&gt;
&lt;P&gt;For Example: &lt;B&gt;&lt;I&gt;$web | fl&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you happen to know which property to specify, simply append the property name with the variable.&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image010_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image010_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image010 border=0 alt=clip_image010 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image010_thumb.jpg" width=244 height=113 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image010_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In this example, two content databases are outputted because the Web Application has two content databases attached. What if you only need to make changes to one of them? &lt;B&gt;Where-object&lt;/B&gt; command-let is available which assists in filtering down results. An alias exists for the where-object command-let called &lt;B&gt;where&lt;/B&gt; which is what I prefer to use.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web.contentdatabases | where {$_.name –eq “WSS_Content”} &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The example above demonstrates how to view and filter properties against a single object\variable. What if you know which property to use and simply want to filter directly from the command-let. Some command-lets offer parameters which allow filtering on the fly.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;For Example&lt;/B&gt;, the –filter parameter is available running Get-SpSite command-let.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-spsite –filter {$_.owner –eq “contosoweb\administrator”}&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This example outputs every site collection where the owner is set as contosoweb\administrator. This is a much faster query when dealing with a large # of sites.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; You can also use the –like wild card instead of –eq.&lt;/P&gt;
&lt;P&gt;For Example: &lt;B&gt;&lt;I&gt;Get-spsite –filter {$_.owner –like “contoso\ad*”}&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Setting Properties&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Besides viewing properties, it’s possible to update properties as well.&lt;/P&gt;
&lt;P&gt;For Example, setting a property called name and updating it using update method:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web.name&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Output: SharePoint – 80&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web.name = “My Renamed Site!”&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web.update()&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$web.name&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Output: My Renamed Site!&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&amp;nbsp;&lt;/B&gt;&lt;B&gt;&amp;nbsp;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Running Methods&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Besides using the update method above to set a property, you have a variety of methods available for a specific object type. For Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image012_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image012_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image012 border=0 alt=clip_image012 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image012_thumb.jpg" width=244 height=38 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_D3F5/clip_image012_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Scripting with PowerShell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;PowerShell scripts provide an automated approach to group one or more command-lets in order to accomplish one or more tasks. For Example, PowerShell scripts can provision new Web Applications\Site Collections, service applications, or backup\restore farm. Again, the possibilities are endless depending on what an Administrator wants to do. A powershell script is as easy as dropping your command-lets in notepad and saving the file with a .ps1 extension. Variables are often used in PowerShell scripts because they save time in writing scripts as well as provide a cleaner look to the script. The following example is a simple script to provision a new site collection:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$tem = get-spwebtemplate –identity STS#0&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$russmax = get-spuser –identity contoso\administrator -web http://contosoweb&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$DB = get-contentdatabase &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;new-spsite -url http://contosoweb/sites/dancan -template $tem -Name DanCanSite -Description DQ -owneralias $russmax -contentdatabase $db&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;After saving this script as newsite.ps1, launch powershell and run the following from the directory where the script resides:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;.\newsite.ps1&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Also, custom command-lets and functions can be created and used within PowerShell scripts to achieve a more desirable result. Advanced PowerShell scripts for SharePoint 2010 will be available on codeplex soon.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.codeplex.com/SharePointPSScripts/" mce_href="http://www.codeplex.com/SharePointPSScripts/"&gt;http://www.codeplex.com/SharePointPSScripts/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9925750" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>PowerShell Intro for SharePoint Administrators - Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/11/11/powershell-intro-for-sharepoint-administrators-part-1.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/11/11/powershell-intro-for-sharepoint-administrators-part-1.aspx</id><published>2009-11-11T22:27:00Z</published><updated>2009-11-11T22:27:00Z</updated><content type="html">&lt;P&gt;PowerShell has been nicely integrated into SharePoint 2010 and is the eventual replacement of stsadm. Stsadm still exists with SharePoint 2010 for backward compatibility reasons but PowerShell is here to stay and will be the most widely adopted and used out of the two. PowerShell is included as a prerequisite which is automatically downloaded and installed during the prerequisite install of SharePoint 2010. Part 1 of this nugget will focus on basics of PowerShell including features and where to start. Part 2 will contain some more advance topics such as scripting and manipulating objects by setting properties or running methods against them. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Basics&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell™ helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows. &lt;/P&gt;
&lt;P&gt;Built-in Windows PowerShell commands, called &lt;I&gt;cmdlets&lt;/I&gt;, let you manage the computers in your enterprise from the command line. Windows PowerShell™ &lt;I&gt;providers&lt;/I&gt; let you access data stores, such as the registry and certificate store, as easily as you access the file system. In addition, Windows PowerShell™ has a rich expression parser and a fully developed scripting language.&lt;/P&gt;
&lt;P&gt;Windows PowerShell™ includes the following features: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Cmdlets for performing common system administration tasks, such as managing the registry, services, processes, and event logs, and using Windows Management Instrumentation. &lt;/LI&gt;
&lt;LI&gt;A task-based scripting language and support for existing scripts and command-line tools. &lt;/LI&gt;
&lt;LI&gt;Consistent design. Because cmdlets and system data stores use common syntax and naming conventions, data can be shared easily and the output from one cmdlet can be used as the input to another cmdlet without reformatting or manipulation. &lt;/LI&gt;
&lt;LI&gt;Simplified, command-based navigation of the operating system, which lets users navigate the registry and other data stores by using the same techniques that they use to navigate the file system. &lt;/LI&gt;
&lt;LI&gt;Powerful object manipulation capabilities. Objects can be directly manipulated or sent to other tools or databases. &lt;/LI&gt;
&lt;LI&gt;Extensible interface. Independent software vendors and enterprise developers can build custom tools and utilities to administer their software. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Note: The basics section was taken directly from technet because I couldn’t have written this any better. See the resources section at the bottom of this blog for direct access to the site.&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;PowerShell Features&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;TAB – Expansion&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It’s possible if you do not know an entire cmdlet to tab through what you have typed in order to find a match. Cmdlets always start with a verb-cmdlet name combination. Tab expansion is great for quickly tabbing through all matching cmdlets. For Example, the entire first part of the name (the verb) and the hyphen that follows it must be inputted. For example, if you type &lt;B&gt;get-co&lt;/B&gt; and then press the &lt;B&gt;Tab&lt;/B&gt; key, Windows PowerShell will automatically expand this to the &lt;B&gt;Get-Command&lt;/B&gt; cmdlet. If you press &lt;B&gt;Tab&lt;/B&gt; key again, Windows PowerShell replaces this with the only other matching cmdlet name, &lt;B&gt;Get-Content&lt;/B&gt;.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Pipelining&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Pipelining is the process where the output of one command is piped to a second command using the Pipline operator |.&lt;/P&gt;
&lt;P&gt;For Example:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;get-spwebapplication –identity &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/" mce_href="http://contosoweb/"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb/&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; | new-spcontentdatabase –name contosodb&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;In this example, the output of get-webapplication is piped over to new-spcontentdatabase cmdlet. The new-spcontentdatabase cmdlet has –webapplication parameter and it’s required. You don’t need to specify this parameter because it’s piped over.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Format List&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Format-List cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. Typically, the alias of FL is used instead via piping.&lt;/P&gt;
&lt;P&gt;For example: &lt;B&gt;&lt;I&gt;get-spwebapplication –identity &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/" mce_href="http://contosoweb"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; | FL&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Aliases&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;An alias is another name you assign to a cmdlet, function, script, etc…. There are some built-in aliases within PowerShell. You can look at those by running the get-alias cmdlet. It’s possible to create aliases by using the Set-Alias cmdlet.&lt;/P&gt;
&lt;P&gt;For Example, create an alias named DanCan which runs get-spwebapplication:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Set-Alias DanCan get-spwebapplication&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Now running DanCan will produce the same result as get-spwebapplication.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Variables&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;PowerShell contains basic programming principles such as using Variables. Variables are simply an object that holds something. For Example, you can create variables to hold a specific content database. What you do with that variable is endless in terms of options available which will be discussed in the next nugget. For now, it’s important to understand how to declare variables.&lt;/P&gt;
&lt;P&gt;To declare a variable named Var to hold content database named contosoDB type the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$var = get-spcontentdatabase –identity contosoDB&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Type $var and it will output what’s stored in the variable.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Getting Help with &lt;I&gt;get-help&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;PowerShell is accessible via the start menu:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image002_thumb.jpg" width=244 height=87 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note&lt;/B&gt;: PowerShell is referred to as SharePoint 2010 Management Shell in SharePoint 2010 &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Scenario:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Great, it’s opened now what do I do! In this scenario, an administrator, Dan, must use PowerShell to create a new site collection using team site template and is unsure of which cmdlet or syntax to run.&lt;/P&gt;
&lt;P&gt;The Get-Help cmdlet will output every alias, cmdlet, and function using a prefix of *. It’s great for finding out which cmdlet to run and get help on how exactly to run the cmdlet.&lt;/P&gt;
&lt;P&gt;For Example: &lt;B&gt;&lt;I&gt;get-help *&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Try it out and you’ll see it dump out lots of stuff like aliases and cmdlets. If you want to dump out just cmdlets you could type the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help * | where {$_.category –eq “cmdlet”} &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;All SharePoint cmdlets start with SP so to output only SharePoint cmdlets you type the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help *-SP* | where {$_.category –eq “cmdlet”} &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This is great but I’d rather pipe it out to txt file. To pipe any output to a text file append &lt;B&gt;&lt;I&gt;&amp;gt; c:\filepath\filename.txt&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help *-SP* | where {$_.category –eq “cmdlet”} &amp;gt; c:\odst\output.txt&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; Don’t worry about understanding the entire syntax, it will be more familiar after reviewing both PowerShell nuggets.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Verbs are appended to cmdlets which describe the action taken. For Example: creating, removing, or setting a new/modified value on an object. Since I’m looking to create I could be even more granular by typing the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help new-SP* | where {$_.category –eq “cmdlet”} &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image004_thumb.jpg" width=244 height=56 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/PowerShellIntroforSharePointAdministrato_E77A/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;After some mining, the administrator Dan needs to use the &lt;B&gt;New-SPSite&lt;/B&gt; cmdlet. In order to properly run this command Dan needs to know the required parameters and the correct syntax. By default, running the following provides a brief summary and outputs syntax:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help new-spsite&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;What it doesn’t tell you is which parameters are required and a brief description of each parameter. The following gives you that information:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Get-help new-spsite -full&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;A partial of the output:&lt;/P&gt;
&lt;P&gt;&lt;I&gt;SYNOPSIS &lt;BR&gt;&lt;/I&gt;&lt;I&gt;Creates a new site collection at the specified URL. &lt;BR&gt;&amp;nbsp;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;SYNTAX &lt;BR&gt;&lt;/I&gt;&lt;I&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;]] [-ContentDatabase &amp;lt;SPCon tentDatabasePipeBind&amp;gt;] [-Description &amp;lt;String&amp;gt;] [-HostHeaderWebApplication &amp;lt;SPWebApplicationPipeBind&amp;gt;] [-Language &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;] [-SecondaryOwnerAlias &amp;lt;String&amp;gt;] [-SiteSubscription &amp;lt;SPSiteSubscriptionPipeBind&amp;gt;] [-Template &amp;lt;SPWebTemplatePipeBind&amp;gt;] [-WhatIf [&amp;lt;SwitchParameter&amp;gt;]] [&amp;lt;CommonParameters&amp;gt;] &lt;BR&gt;DETAILED DESCRIPTION &lt;BR&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;The New-SPSite cmdlet creates a new site collection with the URL and owner specified by the Url and OwnerAlias parameters.&lt;I&gt; &lt;BR&gt;&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;PARAMETERS &lt;BR&gt;&lt;/I&gt;&lt;I&gt;-Url &amp;lt;String&amp;gt; &lt;BR&gt;&lt;/I&gt;&lt;I&gt;Specifies the URL that the new site collection uses. If this is not a host header site, the URL must start with the containing the Web application URL &lt;BR&gt;&lt;/I&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Required?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; true &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Position?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Accept pipeline input?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; True &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Accept wildcard characters?&amp;nbsp; false&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;The required parameters are URL and Owner. Dan also wants to specify a team site template so it will look like the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;New-spsite –url &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/sites/snackattack%20" mce_href="http://contosoweb/sites/snackattack%20"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb/sites/snackattack &lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt;-OwnerAlias contoso\farmadmin -template STS#0&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note&lt;/B&gt; – To get a full list of installed templates run the following: &lt;B&gt;&lt;I&gt;get-spwebtemplate&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;TIP: Get-Command&lt;/B&gt; cmdlet –syntax can also if an Administrator just needs to review the syntax.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Resources: &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/bb978526.aspx" mce_href="http://technet.microsoft.com/en-us/library/bb978526.aspx"&gt;http://technet.microsoft.com/en-us/library/bb978526.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/dd347700.aspx" mce_href="http://technet.microsoft.com/en-us/library/dd347700.aspx"&gt;http://technet.microsoft.com/en-us/library/dd347700.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/dd347728.aspx" mce_href="http://technet.microsoft.com/en-us/library/dd347728.aspx"&gt;http://technet.microsoft.com/en-us/library/dd347728.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://technet.microsoft.com/en-us/library/dd347730.aspx" mce_href="http://technet.microsoft.com/en-us/library/dd347730.aspx"&gt;http://technet.microsoft.com/en-us/library/dd347730.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921097" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Granular Backup-Restore Part 2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/22/sharepoint-2010-granular-backup-restore-part-2.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/22/sharepoint-2010-granular-backup-restore-part-2.aspx</id><published>2009-10-22T16:40:00Z</published><updated>2009-10-22T16:40:00Z</updated><content type="html">&lt;P&gt;This is part 2 of granular backup/restore&amp;nbsp;blog in which I’ll cover the Recover data from an unattached content database option in Central Administration. This is located in backup/restore section under granular backup/restore. SharePoint 2010 utilizes SQL snapshots both to create and to restore from. This blog will also cover the overall uses of snapshots since they can be used in multiple ways. You can be has granular as possible in choosing what you want to restore from snapshots whether it’s the entire site collection or a specific document library\list.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image002_thumb.jpg" width=244 height=152 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Snapshot Basics&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Before going though the steps it’s important to know the basics of SQL snapshots. SQL snapshots were introduced in SQL 2005 timeframe and only available to Enterprise and Developer editions of SQL. SQL 2008 maintains this rule in that snapshots are only available to Enterprise and Developer editions of SQL. SQL snapshots are a read-only copy of a data base as it existed at snapshot creation. Snapshots operate at the DB page level so when a page is about to be modified for the first time in the source DB, the page is first copied to the snapshot thus preserving the data record. If the page already exists and has been modified post snapshot, it’s not updated or copied to the snapshot. At snapshot creation, all pages from source db are considered new and are copied to the snapshot. Snapshots are linked to the source database where they originated. If the source database goes offline for any reason, then the snapshot is unavailable. This is why snapshots are great for granular backup/restore operations but this shouldn’t be your main backup/restore method. Keep in mind that snapshots are limited to content databases only. To learn more about snapshots check out the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms175158.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms175158.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms175158.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;What can SharePoint 2010 Administrators do with snapshots?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;SharePoint 2010 Administrator can now do common administrative tasks when it comes to snapshots. The following lists some common things which can be performed on a SharePoint 2010 server using PowerShell.&lt;/P&gt;
&lt;P&gt;· Create snapshots&lt;/P&gt;
&lt;P&gt;· Delete snapshots&lt;/P&gt;
&lt;P&gt;· Restore snapshot &lt;/P&gt;
&lt;P&gt;· Use snapshots for granular recovery operations &amp;lt;- Can also use Central Administration &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note&lt;/B&gt;: You cannot create, delete, or restore snapshots on SharePoint 2010 standalone server due to the fact it runs on SQL 2008 express edition. Snapshot operations are not supported against SQL server express edition.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Creating Snapshots&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Two common methods exist for creating snapshots of SharePoint 2010 data.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Method 1: Using SQL Server&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Snapshots are created via TSQL commands within SQL Management Studio query window. SQL Management Studio doesn’t expose any UI for creating snapshots. If my content database is named "WSS_Content" then I would run the following query from SQL Management Studio:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;CREATE DATABASE ContentSnapshot on (NAME = "WSS_Content", Filename = 'c:\snapshot\contentsnap.ss') as SNAPSHOT OF "WSS_Content"; &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Once this is completed, the snapshot resides in the snapshots folder.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image004_thumb.jpg" width=244 height=163 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Method 2: Using PowerShell aka “SharePoint Management Console”&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;SharePoint Management Console can also be used to create snapshots. Yes, this is a fancy way of saying powershell but get used to hearing it since it’s listed that way on the start menu. You can now create SQL snapshots from a SharePoint 2010 server. Using SharePoint Management Console you can input something like the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$ContentDB = get-spcontentdatabase WSS_Content&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$ContentDB.Snapshots.CreateSnapshot()&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Below, a new snapshot is created within SQL Management Studio:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image006_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image006_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image006_thumb.jpg" width=244 height=129 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image006_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Recover Data from an unattached content database&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The recover data from an unattached content database option is used for pulling data out of a snapshot or detached content database and exporting to a file. The exported file can be imported back into production using the sp-import cmdlet via powershell. Both Central Administrator and Powershell can be used to pull data out of a snapshot. Three specific operations exist depending on what specifically you want to pull out of the snapshot. Selecting the recover data from an unattached content data base option exposes the following operations.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image008_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image008_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image008 border=0 alt=clip_image008 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image008_thumb.jpg" width=244 height=68 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image008_thumb.jpg"&gt;&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Browse Content&lt;/B&gt; – Provides ability to browse for a specific site collection, Site, or list. Once a selection is made, the same operations are available which is backup site collection or Export site or list. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Backup Site collection – &lt;/B&gt;Provides the ability to backup a site collection from a snapshot which can then be restored into production&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Export Site or List &lt;/B&gt;– Provides the ability to export a specific site, list, or document library from a snapshot&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Walkthrough &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Using Granular backup/restore to pull a document library from a snapshot and import into production&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Central Administrator&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This example demonstrates exporting a document library named hr out of a snapshot named “contentsnapshot2”:&lt;/P&gt;
&lt;P&gt;1.) Within Central Administration, Select backup/restore, Recover Data from an unattached content database&lt;/P&gt;
&lt;P&gt;2.) The following screen is where the SQL server name is populated and the corresponding snapshot name:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image010_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image010_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image010 border=0 alt=clip_image010 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image010_thumb.jpg" width=244 height=143 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image010_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;After filling out required fields and selecting Export site or list click next.&lt;/P&gt;
&lt;P&gt;3.) After clicking next, drill down to specified list as well as includes options for exporting security, version, and specify export path.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image012_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image012_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image012 border=0 alt=clip_image012 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image012_thumb.jpg" width=244 height=188 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart2_A438/clip_image012_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Select the start export button to pull the data from the snapshot into the export.cmp.&lt;/P&gt;
&lt;P&gt;4.) Finally, run the &lt;B&gt;import-spweb &lt;/B&gt;cmdlet via powershell to import the data back into production. For these steps, see the previous nugget.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Powershell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This example demonstrates exporting a document library named hr out of a snapshot named “contentsnapshot”:&lt;/P&gt;
&lt;P&gt;1.) Get the snapshot database and assign it to variable named $snappy:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$snappy = get-spcontentdatabase -ConnectAsUnattachedDatabase -DatabaseServer contososql -DatabaseName contentsnapshot&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;2.) Pipe $snappy with export-spweb cmdlet to pull hr list out of the snapshot:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$snappy | export-spweb &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/" mce_href="http://contosoweb"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; –usesqlsnapshot –itemurl /hr –path \\contososql\bu\mybackup.cmp&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;3.) Finally, run the &lt;B&gt;import-spweb&lt;/B&gt; cmdlet via PowerShell to import the data back into production. For these steps, see the part 1 of granular backup/restore blog.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911495" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Granular Backup-Restore Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/21/sharepoint-2010-granular-backup-restore-part-1.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/21/sharepoint-2010-granular-backup-restore-part-1.aspx</id><published>2009-10-21T20:44:00Z</published><updated>2009-10-21T20:44:00Z</updated><content type="html">&lt;P&gt;Hello! Russ Maxwell here and I’d like to provide a glimpse into SharePoint 2010 granular backup/restore. Several things have changed and have been improved in this area. This article is specifically themed around granular backup\restore and what you need to know. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Key Concepts&lt;/B&gt;:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Granular Backup&lt;/B&gt;: Granular backup has been placed into its own section within Central Administrator. This includes multiple options including the following options:&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Perform a site collection backup&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Export a site or list&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Recover data from an unattached content database&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image002_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image002_thumb.jpg" width=244 height=152 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image002_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Basics&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;In SharePoint 2007, all granular backup and restore operations were only available using stsadm. SharePoint 2010 has integrated granular backup restore operations into both Central Administrator and PowerShell. Some backward compatibility does exist with stsadm but PowerShell is the new and improved replacement. Stsadm will be left out of this blog. Part 1 of this blog will include all granular backup/restore options except for “Recover data from an unattached content database”. Part 2 of this series will be dedicated to that topic. Performing backup operations deemed as granular can be performed from Central Administrator or PowerShell. Granular restore operations are only available using PowerShell. SharePoint 2010 is more flexible in terms of what can be backed up and restored. It’s possible to backup and restore site collection, sites, lists, document libraries, and items. The options for performing granular backups using Central Administrator are:&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Perform a site collection backup&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Export a site or list&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;· &lt;B&gt;Recover data from an unattached content database (Covered in Part 2 of this series)&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=4&gt;&lt;/FONT&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=4&gt;Granular backup operations&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Backing up a Site Collection&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;You can backup a specific site collection using either Central Administrator or Powershell.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Central Administrator&lt;/B&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Select Backup and Restore&lt;/LI&gt;
&lt;LI&gt;From the UI select Perform a site collection backup&lt;/LI&gt;
&lt;LI&gt;Select the appropriate site collection from the pull down menu&lt;/LI&gt;
&lt;LI&gt;Include proper UNC path including backup file named like: filename.bak&lt;/LI&gt;
&lt;LI&gt;Selecting Start backup redirects to _admin/sitebackuporexportstatus.aspx page.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Powershell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;backup-spsite -identity http://contosoweb -path &lt;A href="file://server/backupshare/bufile.bak"&gt;\\server\backupshare\bufile.bak&lt;/A&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Backing up a Site, Library, or List&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Exporting a Site/sub-site&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Export a specific site using Central Administrator:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;1. Select Backup and Restore &lt;BR&gt;2. From the UI select Export a site or list &lt;BR&gt;3. Select Site Collection\Site "leave list drop down clear" &lt;BR&gt;4. Optional categories is to export full security or export versioning history &lt;BR&gt;5. Selecting Start export redirects to _admin/sitebackuporexportstatus.aspx page.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Powershell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;export-spweb -identity http://contosoweb -path \\servershare\bu\site.cmp&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Export a specific list or library:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;1. Select Backup and Restore &lt;BR&gt;2. From the UI select Export a site or list &lt;BR&gt;3. Select Site Collection\Site &lt;BR&gt;4. Select a list &lt;BR&gt;5. Optional categories “export full security or export versioning history” &lt;BR&gt;6. Selecting Start export redirects to _admin/sitebackuporexportstatus.aspx page.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Using Powershell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;export-spweb -identity http://contosoweb -path \\servershare\bu\hrpowershell.cmp -itemurl /cake&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note&lt;/B&gt;: This example demonstrates exporting a document library named cake from Contosoweb site.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=4&gt;&lt;/FONT&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT size=4&gt;Granular restore operations&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Granular restore operations require the use of Powershell as no UI in Central Administrator exists. Two cmdlets are available for granular restore operations.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;restore-spsite &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;This cmdlet is used to restore site collections that have been backed up using “Perform a Site Collection Backup” in central administrator or backed up using &lt;B&gt;backup-spsite&lt;/B&gt; cmdlet.&lt;/P&gt;
&lt;P&gt;For Example: &lt;B&gt;&lt;I&gt;restore-spsite -identity http://contosoweb -path \\server\backupshare\backupfile.bak&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;You have plenty of parameters available but the example demonstrates the required parameters. To get the full scope of parameters you can run:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;get-command restore-spsite -syntax&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;What you should know about using restore-spsite&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The identity/URL parameter shouldn't point to a site collection that is present. If the intention is to overwrite an existing site collection, you must use the -force parameter.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;import-spweb &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This cmdlet is used to restore sites, list, and libraries exported with “export site or list” option in central administrator or using &lt;B&gt;export-spweb&lt;/B&gt; cmdlet.&lt;/P&gt;
&lt;P&gt;For Example: &lt;B&gt;import-spweb -identity http://contosoweb/ -path \\appserver\bu\list.cmp&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; You can’t decipher if a list or library is being imported into the contosoweb site using import-spweb. This has been predefined in the backup prior to running import-spweb.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;What you should know about using import-spweb&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Sites and subsites&lt;/B&gt;: Importing a site/subsite works as long as you specify a URL with a site that contains a matching template. For Example, importing a team site to &lt;A href="http://contosoweb/" mce_href="http://contosoweb"&gt;http://contosoweb&lt;/A&gt; requires that I first provision a site using the team site template using URL http://contosoweb. Attempting to import to a site using a blank template or different template will result in an error.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;List and Libraries: &lt;/B&gt;It’s important to determine exactly what items you want to import into a list or document library. If no items exist, then running the command in the example above will suffice and all items will be imported. What if a user accidently deletes 5 items out of 1,000 and you simply want to restore those 5 items? By default, the import-spweb cmdlet overwrites items if they exist with the restored version. In this case, the item version prior to restore can be salvaged by restoring the previous version as long as versioning is enabled. To prevent a scenario where you want items which currently exists to be ignored by import operation, you must include the &lt;B&gt;-updateversions&lt;/B&gt; parameter with ignore&lt;/P&gt;
&lt;P&gt;So in this example, to restore 5 items without affecting the 995 items which currently reside in a list named odst I can run the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;Import-spweb –identity &lt;/I&gt;&lt;/B&gt;&lt;A href="http://contosoweb/" mce_href="http://contosoweb/"&gt;&lt;B&gt;&lt;I&gt;http://contosoweb/&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; -path &lt;/I&gt;&lt;/B&gt;&lt;A href="file://appserver/bu/odst.cmp" mce_href="file:///\\appserver\bu\odst.cmp"&gt;&lt;B&gt;&lt;I&gt;\\appserver\bu\odst.cmp&lt;/I&gt;&lt;/B&gt;&lt;/A&gt;&lt;B&gt;&lt;I&gt; -updateversion ignore&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Note:&lt;/B&gt; New Items created within the ODST library after initial export will not be touched by an import operation.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Check Granular backup job status&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;A sleek new page has been added to check on granular job back status. Two ways to get to this page is through Central Administrator and after initiating a granular backup automatically redirects you to the &lt;B&gt;_admin/sitebackuporexportstatus.aspx&lt;/B&gt; page. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image004_2.jpg" mce_href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image004_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image004_thumb.jpg" width=244 height=148 mce_src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/SharePoint2010GranularBackupRestorePart1_C136/clip_image004_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Stay tuned for Part 2 of this series which I’ll discuss how SharePoint 2010 leverages snapshots using the Recover data from an unattached database option.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910898" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Installing prerequisites without an internet connection.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/21/sharepoint-2010-installing-prerequisites-without-an-internet-connection.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/21/sharepoint-2010-installing-prerequisites-without-an-internet-connection.aspx</id><published>2009-10-21T18:45:00Z</published><updated>2009-10-21T18:45:00Z</updated><content type="html">&lt;P&gt;&lt;B&gt;How to automate prerequisite install without an internet connection&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;I want to cover a few things about the prerequisite installer that everyone should know about.&amp;nbsp; First, all but one prerequisite component is installed locally.&amp;nbsp; The rest of them are downloaded from the web during setup.&amp;nbsp; This is great for servers with an internet connection but what if you want to install prereq’s without an internet connection.&amp;nbsp; This blog demonstrates how to run automate the install of prerequisite components on a box without requiring an internet connection.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;First, prerequisites need to be manually downloaded and moved over to server:&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/SQLSERVER2008_ASADOMD10.msi" mce_href="http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/SQLSERVER2008_ASADOMD10.msi"&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;SQLClient &lt;A href="http://go.microsoft.com/fwlink/?LinkId=123718"&gt;http://go.microsoft.com/fwlink/?LinkId=123718&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;SyncFramework &lt;A href="http://go.microsoft.com/fwlink/?LinkID=141237"&gt;http://go.microsoft.com/fwlink/?LinkID=141237&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;MSChart &lt;A href="http://go.microsoft.com/fwlink/?LinkID=122517"&gt;http://go.microsoft.com/fwlink/?LinkID=122517&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;PowerShell&amp;nbsp;&amp;nbsp; &lt;A href="http://download.microsoft.com/download/D/0/E/D0E6D2C1-2593-4017-B26D-7375BC9263D5/PowerShell_Setup_amd64.msi"&gt;http://download.microsoft.com/download/D/0/E/D0E6D2C1-2593-4017-B26D-7375BC9263D5/PowerShell_Setup_amd64.msi&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Geneva Framework &lt;A href="http://download.microsoft.com/download/F/3/D/F3D66A7E-C974-4A60-B7A5-382A61EB7BC6/MicrosoftGenevaFramework.amd64.msi"&gt;http://download.microsoft.com/download/F/3/D/F3D66A7E-C974-4A60-B7A5-382A61EB7BC6/MicrosoftGenevaFramework.amd64.msi&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Microsoft ADOMD.NET &lt;A href="http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/SQLSERVER2008_ASADOMD10.msi"&gt;http://download.microsoft.com/download/A/D/0/AD021EF1-9CBC-4D11-AB51-6A65019D4706/SQLSERVER2008_ASADOMD10.msi&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Automate Installing Prerequisites without Internet Connection&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;It's possible to install each prerequisite manually on a server with no internet connection but a more automated option exists.&amp;nbsp; The steps are the following:&lt;/P&gt;
&lt;P&gt;1.) Place the downloaded files into a directory.&amp;nbsp; For my example: &lt;STRONG&gt;&lt;EM&gt;C:\sp&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;2.) Run the following command via command prompt within the root directory of the install media:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;PreRequisiteInstaller.exe /SQLnCli:C:\sp\sqlncli.msi /ChartControl:C:\sp\MSChart.exe &lt;BR&gt;/PowerShell:C:\sp\PowerShell_Setup_amd64.msi /Sync:C:\sp\Synchronization.msi &lt;BR&gt;/IDFX:C:\sp\MicrosoftGenevaFramework.amd64.msi /adomd:C:\sp\SQLSERVER2008_ASADOMD10.msi&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910821" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Configuring Search Service Application using PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-configuring-search-service-application-using-powershell.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-configuring-search-service-application-using-powershell.aspx</id><published>2009-10-20T18:29:00Z</published><updated>2009-10-20T18:29:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;NOTE:&amp;nbsp; This has been updated to work with Beta 2 build!&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It might be necessary at some point to use PowerShell to provision search service applications.&amp;nbsp; For Example, setting up a search service application for hosted sites requires you to use PowerShell.&amp;nbsp; The following steps manually take you through this process and I highly recommend going through the steps to become more familiar with the command-lets.&amp;nbsp; ​&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Creating Search Service Application using PowerShell&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;1.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Create Application Pool&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Creating a an application pool for your search service application and throwing the object into a variable called $ app:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $app = new-spiiswebserviceapplicationpool –name contososearch-apppool –account domain\user&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;2.&lt;/I&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt; &lt;/I&gt;&lt;/B&gt;&lt;B&gt;Create search service application &lt;/B&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $searchapp = new-spenterprisesearchserviceapplication -name ContosoSearchServiceApplication -applicationpool $app&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;B&gt;Note&lt;/B&gt;: Add the -partitioned switch after -name if the search service application will be consumed in a hosted environment.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;3.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Create search service application proxy &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$proxy = new-spenterprisesearchserviceapplicationproxy -name Contososearchserviceapplicationproxy -searchapplication $searchapp&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Note&lt;/B&gt;: Add the -partitioned switch if the search service application will be consumed in a hosted environment. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Verify the search service application proxy is online.&amp;nbsp; It should be online by default..&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;$proxy.status&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it's not online, you can change the status by punching in the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;To change this property you could type something like this: 
&lt;P&gt;&lt;B&gt;&lt;I&gt;$proxy.status = “online”&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Finally, you must update the change by calling the update method.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$changestatus.update()&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;4.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Provision Search Administration Component&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Configure the administration component of the associated Searchserviceapplication.&amp;nbsp; You can do this with the following steps:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$si = get-spenterprisesearchserviceinstance –local&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;set-spenterprisesearchadministrationcomponent –searchapplication $searchapp&amp;nbsp; –&amp;nbsp;&amp;nbsp;&amp;nbsp; searchserviceinstance $si&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;5.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Provision Crawl and Query Components &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;By default, a search application created in PowerShell has a crawl topology but is missing the following:&lt;/P&gt;
&lt;P&gt;· crawl component&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;· query component&lt;/P&gt;
&lt;P&gt;You cannot add a crawl\query component to the default crawl\query topology because it's set as active and the property is read only.&amp;nbsp; The easiest way around this is creating a new crawl topology and new query topology.&amp;nbsp; After creating both, they will be set as inactive by default.&amp;nbsp; This allows for both crawl components to be added to crawl topology and query component to be added to newly created query topology. Finally, you can set this new crawl topology to active.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Steps are the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;B&gt;a.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Create Crawl Topology&lt;/B&gt; 
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Create object and input output of newly created crawl topology.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;$ct = $searchapp | new-spenterprisesearchcrawltopology&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;What if you already created a new crawl topology but never dropped it in a variable.&amp;nbsp; That's okay, you can still drop it in a variable.&amp;nbsp; First, you must know the ID for the crawl topology which should still be marked as inactive.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$searchapp | get-spenterprisesearchcrawltopology &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Let's say the ID in this case is 2e25dcbf-ee71-41e4-b843-3f17d1064386.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;$ct =&lt;/I&gt;&lt;/B&gt; &lt;B&gt;&lt;I&gt;$crawltopology&amp;nbsp; = $searchapp | where-object {$_.id -eq "2e25dcbf-ee71-41e4-b843-3f17d1064386"}&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;b.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Provision Crawl Component &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Create a crawl component for new crawl topology.&amp;nbsp; $ct can be passed as the identified crawl topology.&amp;nbsp; $si can be passed&amp;nbsp;as the search instance.&amp;nbsp; &amp;nbsp;We still need to know the crawl store ID because it's required via -crawldatabase parameter to create the new-spenterprisesearchcrawlcomponent.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To find the Guid we can run the following:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;$searchapp.crawlstores &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copy the GUID for ID.&amp;nbsp; For Example:&lt;/P&gt;
&lt;P&gt;74278909-cb14-46ee-96e2-69ad77ffdfc0&lt;/P&gt;
&lt;P&gt;Create a new crawl component.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;new-spenterprisesearchcrawlcomponent -searchapplication $searchapp -crawltopology $ct -crawldatabase "74278909-cb14-46ee-96e2-69ad77ffdfc0" -searchserviceinstance $si&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Finally, set the new crawl topology as active.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;$ct | set-spenterprisesearchcrawltopology -active&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;c.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Create Query Topology &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create new Query topology into object $qt&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $qt = $searchapp | new-spenterprisesearchquerytopology -partitions 1&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $p1 = ($qt | get-spenterprisesearchindexpartition)&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;d.&lt;/B&gt;&lt;B&gt; &lt;/B&gt;&lt;B&gt;Provision query component &lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a query component for new query topology&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new-spenterprisesearchquerycomponent -indexpartition $p1 -querytopology $qt -searchserviceinstance $si &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $p1 | set-spenterprisesearchindexpartition&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assign the property store to the index partition&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $p1 | set-spenterprisesearchindexpartition -propertydatabase "GUID HERE"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where is the propertydatabase GUID? &lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;$searchapp.propertystores to copy the ID "GUID"&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;Finally, set the query topology as active&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;B&gt;&lt;I&gt;$qt | set-spenterprisesearchquerytopology –active&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910104" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Multi-Tenant Hosting Part 2 “Configuring”</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-multi-tenant-hosting-part-2-configuring.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-multi-tenant-hosting-part-2-configuring.aspx</id><published>2009-10-20T18:24:25Z</published><updated>2009-10-20T18:24:25Z</updated><content type="html">&lt;p&gt;&lt;b&gt;Part 2 - Configuring Hosting&lt;/b&gt;&lt;b&gt;​&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Configuring hosting requires powershell so the steps are all based off of using it.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;1. Create a subscription and assign sites to it:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$sub = new-spsitesubscription&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$sub&amp;#160;&amp;#160; &lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;2. Pulling the site collection or set of site collections you wish to join to the site group:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;​ &lt;b&gt;&lt;i&gt;get-spsite&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$site = get-spsite | where {$_.url -eq &amp;quot;http://contoso&amp;quot;}&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$site&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;​&lt;/p&gt;  &lt;p&gt;​Now you have two variables.&amp;#160; Variable 1 $sub object contains a new spsitesubscription.&amp;#160; Variable 2 $site contains a site collection.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;​&lt;/b&gt;&lt;b&gt;3. &lt;/b&gt;&lt;b&gt;Add&amp;#160; the site collection $site, to the newly created site subscription $sub.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;set-spsite -identity $site -sitesubscription $sub&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Check whether it has been added correctly by doing the following:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;get-spsitesubscription&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If a database ID exists, then you can type the following&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;get-spdatabase | where-object {$_.id -match &amp;quot;full or partial guid&amp;quot;}&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Will output the results of the associated site collection.&lt;/p&gt;  &lt;p&gt;​&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;4. C&lt;/b&gt;&lt;b&gt;reate a secondary subscription and associate a different site collection within same web application for demonstration purposes using the steps above.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;5. Create a SubscriptionSettings Service Application and Proxy&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;​&lt;b&gt;A.&amp;#160; Start the WSS Subscription Settings Service&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;B.&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;Create Service Application and Proxy via PowerShell&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$appPool&amp;#160; =&amp;#160; New-SPIISWebServiceApplicationPool -Name SettingsServiceApppool -Account domain\use&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$sa = new-spsubscriptionsettingsserviceapplication –Name SubscriptionSettingsServiceApplication –Databasename SubscriptionSettingsServiceApplicationDB –applicationpool $appPool&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$sap = new-SPSubscriptionSettingsSericeApplicationProxy –ServiceApplication $sa&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;6. Creating the Tenant Admin Site for each site group&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;​&lt;b&gt;&lt;i&gt;$sub = get-spsitesubscription –identity “http://server”&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$tasite = new-spsite –url “&lt;/i&gt;&lt;/b&gt;&lt;a href="http://server/sites/tasite1"&gt;&lt;b&gt;&lt;i&gt;http://Contoso/sites/tasite1&lt;/i&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;i&gt;” –template “tenantadmin#0” –owneralias domain\username –sitesubscription $sub&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;7. Provision a search service application in hosting mode.&amp;#160; Please see the Configure Search Service application using Powershell blog.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;8. Feature's and hosting&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Once a feature has been installed into the farm, it's available to all sites and can be activated through manage features pages.&amp;#160; The way to control this in a hosting scenario is you only provide the features available to a given site group through various PowerShell commands.&amp;#160; Any features not listed are excluded and not available for all site collections that belong to the corresponding site group.&amp;#160; Steps are below:&lt;/p&gt;  &lt;p&gt;Create a feature set:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;$fs =New-SPFeatureSet&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Adding features to a feature set&lt;b&gt;:&amp;#160;&amp;#160; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;​&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;$f&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;arm = Get-SPFarm&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;$feature1 =$farm.FeatureDefinitions | where{$_.ID -eq &amp;quot;02464c6a-9d07-4f30-ba04-e9035cf54392&amp;quot;}&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Add-SPFeatureSetMember -Identity $fs -FeatureDefinition $feature1&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Adding feature set to subscription:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Set-SPSiteSubscriptionConfig -Identity $sub -FeatureSet $fs&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910100" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>SharePoint 2010 Multi-Tenant Hosting Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-multi-tenant-hosting-part-1.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/20/sharepoint-2010-multi-tenant-hosting-part-1.aspx</id><published>2009-10-20T18:19:05Z</published><updated>2009-10-20T18:19:05Z</updated><content type="html">&lt;p&gt;&lt;b&gt;Hosting 101 Part 1&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;​Before providing the steps of setting up hosting, it's important to understand the main concepts behind O14 hosting.&lt;/p&gt;  &lt;p&gt;O14 has a rich set of hosting features which triumph over the previous version in many ways.&amp;#160; It's now simple to setup hosting on the site collection level.&amp;#160; &lt;/p&gt;  &lt;p&gt;For Example:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Tenant &amp;quot;customer 1&amp;quot; on site collection 1 is hosted on web application A &lt;/li&gt;    &lt;li&gt;Tenant &amp;quot;customer 2&amp;quot; on site collection 2 is hosted on web application A&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Each tenant would only have full administrator rights on his/her assigned site collection.&amp;#160; Customer 2 and users accessing site collection 2 wouldn't be able to access Customer 1's site.&lt;/p&gt;  &lt;p&gt;Also, service applications that are in hosting mode would keep each tenants data separate from another tenants.&amp;#160; For example, one shared search service application could service customer 1\site collection 1's data and customer 2/site collection 2's data while keeping them separate from each other.&lt;/p&gt;  &lt;p&gt;For Example: Users searching in site collection 1 will not be able to search and find content that resides in site collection 2.&amp;#160; Users searching in site collection 2 will not be able to search and find content that resides in site collection 1.&amp;#160; They will be able to search and locate data within the site collection they are searching from.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Site Groups&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The segmentation is possible through the use of site groups also known as site subscriptions.&amp;#160; In the example above, customer 1's site collection belongs to site group 1 and customer 2's site collection belongs to site group 2. &lt;/p&gt;  &lt;p&gt;Things to know about site groups:&lt;/p&gt;  &lt;p&gt;1. Sites can belong to only one site group at a time. &lt;/p&gt;  &lt;p&gt;2. Sites cannot join a site group that contains sites that exists on a different web application.&lt;/p&gt;  &lt;p&gt;3. A site group can span across more than one content database&lt;/p&gt;  &lt;p&gt;4. No GUI interface for managing site groups.&amp;#160; PowerShell is required to create/manage/remove site groups.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Tenant Admin Site&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;A hosted customer is referred to as a tenant.&amp;#160; You can provision a tenant admin site which gives the tenant full administrator rights over the site collection.&amp;#160; The tenant admin site can be used to create additional sites for example after self service site creation is enabled.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Service Applications and Hosting&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Be default, a service application is consumed at the web application level.&amp;#160; So all sites, under a web application would consume from the same service application and data would be shared.&amp;#160; In hosting mode, a shared service application partitions data where every site group has its own partition.&amp;#160; The partition isn't shared meaning other site groups wouldn't be able to see this data even though all sitegroups are using the same service application.&amp;#160; Configuring hosted service applications may differ based on the type of service application that is being deployed.&amp;#160; &lt;/p&gt;  &lt;p&gt;For Example:&amp;#160; Deploying a Shared search service application requires you to use PowerShell with addition of -partitioned switch&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Features&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;It's also possible to deploy features in an &amp;quot;a la carte&amp;quot; manner to site groups.&amp;#160; So one site group can have more features available than another.&amp;#160; This is configurable from PowerShell.&lt;/p&gt;  &lt;p&gt;Hosting Part 2 provides a step by step walk though using PowerShell&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910095" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>Configuring Kerberos Authentication in SharePoint 2010 Part 1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/20/configuring-kerberos-authentication-in-sharepoint-2010-part-1.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/20/configuring-kerberos-authentication-in-sharepoint-2010-part-1.aspx</id><published>2009-10-20T18:14:00Z</published><updated>2009-10-20T18:14:00Z</updated><content type="html">&lt;p&gt;Configure Kerberos Authentication in O14 Part 1&lt;/p&gt;  &lt;p&gt;When configuring Kerberos with O14 you will be using IIS 7.0.&lt;/p&gt;  &lt;p&gt;Integrated windows authentication is now handled in kernel mode and enabled by default.&amp;#160; This technically was primarily for ease of use and performance boosts since auth is no longer happening in user mode.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;What are the benefits?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;No longer need to register SPN’s for application pool accounts because the AD computer account will be used to decrypt the service ticket.&amp;#160; This is true even if the application pool identify is domain\username.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This works as long as you’re using the netbios or FQDN of the server to access a site.&lt;/p&gt;  &lt;p&gt;Unfortunately, in a Web Farm scenario like SharePoint this doesn’t work because you won’t be passing the Netbios/FQDN of the server to access the site unless it’s a standalone install for testing purposes.&lt;/p&gt;  &lt;p&gt;The work around for enabling Kerberos in a web “SharePoint” farm you need to specify the application pool identity for the associated web application.&amp;#160; Then you need to create an SPN using setspn tool.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Farm scenario task:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Enable Kerberos for the following:&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;·&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;i&gt;SharePoint Web Application “Sharepoint – 80” &lt;/i&gt;&lt;/p&gt;  &lt;p&gt;·&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;i&gt;Site is named contoso.com&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;·&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;i&gt;Web Application is using domain account, ”contoso\farmadmin”, as application pool identity.&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 1:&lt;/b&gt;&lt;b&gt; &lt;/b&gt;Setting &lt;i&gt;useAppPoolCredentials&lt;/i&gt; to true in application.config file.&lt;/p&gt;  &lt;p&gt;The goal is to continue to use kernel mode authentication in IIS 7.0.&amp;#160; I don’t recommend disabling it for the pure purpose of using Kerberos in an O14 environment.&amp;#160; The first step is setting the useAppPool Credentials to true in application.config file for the associated web site.&amp;#160; &lt;/p&gt;  &lt;p&gt;In this example, I want to set this attribute on my “SharePoint – 80” web application:&lt;/p&gt;  &lt;p&gt;Locate the application.config file in the following dir:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;c:\windows\system32\inetsrv\config\&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;When you open application.config host file with notepad you will see something like this for web application “WebApplicationName”:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&amp;lt;system.webServer&amp;gt; &amp;lt;security&amp;gt; &amp;lt;authentication&amp;gt; &amp;lt;windowsAuthentication enabled=&amp;quot;true&amp;quot; &amp;lt;/authentication&amp;gt; &amp;lt;/security&amp;gt; &amp;lt;/system.webServer&amp;gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;I don’t like the fact that useKernelMode was missing from the application.config file by default.&amp;#160; The following steps walk you through enabling both attributes.&lt;/p&gt;  &lt;p&gt;A.) Disable Kernel-mode authentication for the associated web site by going into IIS Manager.&amp;#160; Select the website\authentication\Advanced Settings and uncheck Enable Kernel-mode authentication.&lt;/p&gt;  &lt;p&gt;B.) Perform IIS reset and then go back into Advanced settings and re-enable Kernel-mode authentication by checking the check box.&amp;#160; Perform an IIS reset.&lt;/p&gt;  &lt;p&gt;C.) Launch the applicationhost.config file within c:\Windows\System32\inetsrv\config to verify you see the following:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&amp;lt;system.webServer&amp;gt; &amp;lt;security&amp;gt; &amp;lt;authentication&amp;gt; &amp;lt;windowsAuthentication enabled=&amp;quot;true&amp;quot; useKernelMode=&amp;quot;true&amp;quot;/&amp;gt; &amp;lt;/authentication&amp;gt; &amp;lt;/security&amp;gt; &amp;lt;/system.webServer&amp;gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;D.) Run appcmd and set useAppPoolCredentials attribute to true for the associated web application. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Appcmd set config “SharePoint - 80” /section:windowsauthentication /useAppPoolCredentials:true /commit:MACHINE/WEBROOT/APPHOST&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now checking application.host config file you should see the following for the associated web application:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&amp;lt;system.webServer&amp;gt; &amp;lt;security&amp;gt; &amp;lt;authentication&amp;gt; &amp;lt;windowsAuthentication enabled=&amp;quot;true&amp;quot; useKernelMode=&amp;quot;true&amp;quot; useAppPoolCredentials=&amp;quot;true&amp;quot; /&amp;gt; &amp;lt;/authentication&amp;gt; &amp;lt;/security&amp;gt; &amp;lt;/system.webServer&amp;gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 2: &lt;/b&gt;Trust the service account for delegation&lt;/p&gt;  &lt;p&gt;A.) Launch Active Directory Users and Computers &lt;/p&gt;  &lt;p&gt;B.) Locate account running as the application pool identity&lt;/p&gt;  &lt;p&gt;C.) Go to properties on the account, select delegation tab&lt;/p&gt;  &lt;p&gt;D.) Select “Trust this user for delegation to any service (Kerberos only)&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 3: &lt;/b&gt;Set SPN&lt;/p&gt;  &lt;p&gt;SPN is required to map the service/host name to the Application Pool identity.&amp;#160; &lt;/p&gt;  &lt;p&gt;A.) Install SPN from the following location:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=5fd831fd-ab77-46a3-9cfe-ff01d29e5c46&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=5fd831fd-ab77-46a3-9cfe-ff01d29e5c46&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;B.) From cmd prompt, run the following cmd:&lt;/p&gt;  &lt;p&gt;Setspn.exe –a http/contoso.com contoso\farmadmin&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 4: &lt;/b&gt;Enable Kerberos on the Web Application&lt;/p&gt;  &lt;p&gt;A.) Launch Central Admin and select Application Management&lt;/p&gt;  &lt;p&gt;B.) Select Manage Web Application and choose the appropriate web application&lt;/p&gt;  &lt;p&gt;C.) From the ribbon, select Auth Providers&lt;/p&gt;  &lt;p&gt;D.) Select the associated zone and enable Negotiate (Kerberos) and save&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Step 5: &lt;/b&gt;Verify that Kerberos authentication is working&lt;/p&gt;  &lt;p&gt;A.) Go to the security log on the WFE&lt;/p&gt;  &lt;p&gt;B.) Filter on all Event ID’s 4624’s&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/ConfiguringKerberosAuthenticationinShare_9DF1/clip_image001_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/russmax/WindowsLiveWriter/ConfiguringKerberosAuthenticationinShare_9DF1/clip_image001_thumb.jpg" width="244" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;​ &lt;/p&gt;  &lt;p&gt;In the above event, you can see the logon process is using Kerberos.&amp;#160; If you scroll up on the event further, you can also get the source computer as well as user account used to log in.&amp;#160; It’s easier to filter on this event with the logon account to confirm on a high traffic server.&lt;/p&gt;  &lt;p&gt;With part two, I’ll discuss using Kerberos with service applications.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910087" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>Where have I been?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/10/15/where-have-i-been.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/10/15/where-have-i-been.aspx</id><published>2009-10-15T18:45:44Z</published><updated>2009-10-15T18:45:44Z</updated><content type="html">&lt;p&gt;I’m checking in as it’s been awhile since I’ve posted anything.&amp;#160; I’m currently a beta rotational engineer supporting SharePoint 2010.&amp;#160; I’ve been so wrapped up in supporting the new product in it’s early stages that I haven’t had a lot of time to post on 2007.&amp;#160; I’ll be providing an ample amount of blog post on SharePoint 2010 so feel free to check back at a later date.&lt;/p&gt;  &lt;p&gt;Next week, I’ll be attending the SharePoint conference Oct 19-22nd in Vegas and will be available via the CSS booth in the exhibition hall.&amp;#160; Stop by and say hello and feel free to ask questions.&amp;#160; &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907799" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author></entry><entry><title>Configuring Performance Monitor Log for SharePoint Performance Issues.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/05/28/configuring-performance-monitor-log-for-sharepoint-performance-issues.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/05/28/configuring-performance-monitor-log-for-sharepoint-performance-issues.aspx</id><published>2009-05-28T04:12:00Z</published><updated>2009-05-28T04:12:00Z</updated><content type="html">&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;This is part 2 of troubleshooting SharePoint performance problems.&amp;nbsp; In order to properly diagnose and troubleshoot SharePoint performance problems,&amp;nbsp;Microsoft CSS support often depends on a performance monitor (perfmon) log during problem period.&amp;nbsp; In addition, we might request a baseline perfmon&amp;nbsp;of healthy behavior.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Part 2 of this blog is dedicated to walking you through setting up performance monitor.&amp;nbsp; Why is that necessary?&amp;nbsp; We have a very specific method in collecting this data.&amp;nbsp; A shout out is in store for Jason&amp;nbsp;at MSFT for originally documenting most of these steps.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Steps are below:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;1. Open Performance Monitor, click the + button. Under Performance object, select .NET CLR Memory. Under "Select counters from list", verify that you see Process ID&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 378px; HEIGHT: 375px" height=375 src="http://kmyptw.bay.livefilestore.com/y1paekq2kzt9Q71IFqmTMeKBcQ-v_vIz-GTMHlbNOyPgm69UHrAxcsDYCkeUte8iVc1zHOWlhNnDkJR29va4DTDV3rfc92-FKDP/AddCounter.jpg" width=378 align=left mce_src="http://kmyptw.bay.livefilestore.com/y1paekq2kzt9Q71IFqmTMeKBcQ-v_vIz-GTMHlbNOyPgm69UHrAxcsDYCkeUte8iVc1zHOWlhNnDkJR29va4DTDV3rfc92-FKDP/AddCounter.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="COLOR: #1f497d; mso-bidi-font-family: Arial; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;In this case, it's clear that the PID information is missing so you must&amp;nbsp;fix the counters as this is what enables a mapping of w3wp to a process ID.&amp;nbsp; &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;a)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Click Start, click Run, type cmd, and then click OK.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;b)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;At the command prompt, type unlodctr .NetFramework, and then press ENTER.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;c)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Use the cd command to change to the Windows\Microsoft.Net\Framework\v2.0.50727 folder.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="COLOR: #1f497d; mso-bidi-font-family: Calibri"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT face=Calibri size=3&gt;d)&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;At the command prompt, type lodctr corperfmonsymbols.ini, and then press ENTER&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;Reference the following article for more information: &lt;A href="http://support.microsoft.com/kb/922775"&gt;&lt;FONT color=#0000ff&gt;http://support.microsoft.com/kb/922775&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;2. Add this registry key so that Performance Monitor will list the PID of the W3WP as part of the counter detail. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;The following KB article explains how to do this: &lt;A href="http://support.microsoft.com/kb/281884"&gt;&lt;SPAN style="COLOR: #365f91"&gt;http://support.microsoft.com/kb/281884&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN style="COLOR: #365f91"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;3. Open Performance Monitor&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;4. Expand Performance Logs and Alerts&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;5. Right click on Counter Logs, click New Log Settings and type a name for the Perfmon log and click OK&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;6. Click on the Add Objects button. Then add the following objects and click Close&lt;/SPAN&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;.NET CLR Exceptions&amp;nbsp;&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;.NET CLR Loading&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;.NET CLR Memory&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;.NET Networking&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;ASP.NET&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;ASP.NET Applications&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Memory&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Network Interface&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Physical Disk&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Process&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Processor&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;System&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Web Service&lt;/SPAN&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;o:p&gt;&lt;SPAN style="COLOR: #365f91"&gt;Web Service Cache&lt;/SPAN&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/o:p&gt;&lt;/SPAN&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;:&amp;nbsp; Add the Threads object when troubleshooting CPU Spikes/CPU high utilization.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;7. Make sure to use "Run As" so we can accurately capture the .NET counters. This should be run as the same account as the application pool.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;8. Setup performance logging at 5 second intervals.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;9. Select the Log Files tab and Configure button and set the&lt;/SPAN&gt;&lt;SPAN style="COLOR: #365f91"&gt;&amp;nbsp;preferred directory path and file name.&amp;nbsp; Limit the log file size to 250 MB and hit OK.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #365f91"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;Example screenshot below:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;IMG style="WIDTH: 449px; HEIGHT: 424px" height=424 src="http://kmyptw.bay.livefilestore.com/y1pwiS-OktxiQ_pVou1vG0HS9ikTffsAOK5xnPRwJos2pQytIdgpxg6OAzGoadQqhwmfQS0rLgO7HdrS7TJHi4-aqWX_wWSCtUO/Configurebutton.jpg" width=449 mce_src="http://kmyptw.bay.livefilestore.com/y1pwiS-OktxiQ_pVou1vG0HS9ikTffsAOK5xnPRwJos2pQytIdgpxg6OAzGoadQqhwmfQS0rLgO7HdrS7TJHi4-aqWX_wWSCtUO/Configurebutton.jpg"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;10. Select the Schedule tab and the start up option is your decision on whether or not you want to automatically start the log or manually.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;The Stop Log section settings need to match the following screenshot:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;IMG style="WIDTH: 397px; HEIGHT: 427px" height=427 src="http://kmyptw.bay.livefilestore.com/y1pRPEGJxrsg6MVf727qGaIT1kJz9tWWmXbU5JnmfqjKRdVWQv7d_nXSmQggIJ6RBSfVPP2ek5g6xuuFQqNQuTUd4ZdUnQDQqUH/ScheduleTab.jpg" width=397 mce_src="http://kmyptw.bay.livefilestore.com/y1pRPEGJxrsg6MVf727qGaIT1kJz9tWWmXbU5JnmfqjKRdVWQv7d_nXSmQggIJ6RBSfVPP2ek5g6xuuFQqNQuTUd4ZdUnQDQqUH/ScheduleTab.jpg"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;The goal&amp;nbsp;is that no information is going to be overwritten.&amp;nbsp; So when the buffer limit of 250 MB is reached, a new perfmon log will be created and the existing one is preserved.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;Hit okay and if you set it to start automatically based on a specified time, then you can check Performance Monitor&amp;nbsp;and verify its running.&amp;nbsp; If you set the Start Log option to manual, then you need to go into Performance&amp;nbsp;Monitor&amp;nbsp;and manually start the log.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;IMG style="WIDTH: 413px; HEIGHT: 200px" height=200 src="http://kmyptw.bay.livefilestore.com/y1piL5h68gGyrEemyMx1FvijnLWIXKmzz1CejGNO5oSm4vFvDanXLt-UlZumGjY2cQAuJwX41v2YXeHg5Gr4B3Dmz_wMuGuM48W/Perfmonlog.jpg" width=413 mce_src="http://kmyptw.bay.livefilestore.com/y1piL5h68gGyrEemyMx1FvijnLWIXKmzz1CejGNO5oSm4vFvDanXLt-UlZumGjY2cQAuJwX41v2YXeHg5Gr4B3Dmz_wMuGuM48W/Perfmonlog.jpg"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #365f91"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #365f91"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Great, now perfmon log is up and running but we still need one more piece of information.&amp;nbsp; The PID information is helpful but we need to be able to map which PID&amp;nbsp;or PID's are mapped&amp;nbsp;to&amp;nbsp;a specific application pool.&amp;nbsp; This&amp;nbsp;requires the use of IISAPP.&amp;nbsp; &amp;nbsp;Steps for running IISAPP are the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;11.&amp;nbsp; Go to the same server you configured perfmon and launch cmd prompt.&amp;nbsp; Type the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;iisapp&lt;/P&gt;
&lt;P mce_keep="true"&gt;After hitting enter, you might get prompted to register cscript.&amp;nbsp; Hit yes and run iisapp again.&lt;/P&gt;
&lt;P mce_keep="true"&gt;You will see an output like the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG style="WIDTH: 556px; HEIGHT: 143px" height=143 src="http://kmyptw.bay.livefilestore.com/y1pDK8Q2CmCV_6YI5DpO8P51MB7IFaoWu_UHx4-DfK2xVTcOWOdjAnLYB3eK1unrNrodmRhHS9pRpjiOakXq9oD0gebuf7jnvpP/iisapp.jpg" width=556 mce_src="http://kmyptw.bay.livefilestore.com/y1pDK8Q2CmCV_6YI5DpO8P51MB7IFaoWu_UHx4-DfK2xVTcOWOdjAnLYB3eK1unrNrodmRhHS9pRpjiOakXq9oD0gebuf7jnvpP/iisapp.jpg"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;You can see the value in the screen shot.&amp;nbsp; Now when I launch a perfmon to review and look at process information, I can map the PID to the associated application pool.&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;For data collection purposes, I recommend piping this out to a txt file like running iisapp &amp;gt; c:\iisappout.txt.&lt;/P&gt;
&lt;P mce_keep="true"&gt;I would run this at least every 30 minutes and you can easily configure a script or batch file to automate this process.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;:&amp;nbsp;IISAPP doesn't work in Windows 2008.&amp;nbsp; In order get PID&amp;nbsp; &amp;lt;--&amp;gt;&amp;nbsp; Application Pool mapping you must run the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;Launch cmd prompt and run the following command from the c:\Windows\System32\inetsrv directory:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;appcmd.exe list wp&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Question/Answer Section&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Q: Why do&amp;nbsp;I suggest 5 second interval for sampling period?&lt;/P&gt;
&lt;P mce_keep="true"&gt;A: It really depends on&amp;nbsp;how often the&amp;nbsp;performance problem reproduces and how long you decide to leave&amp;nbsp;the log running.&amp;nbsp; If your capture period is&amp;nbsp;8 hours or less, then I recommend 5 seconds.&amp;nbsp; If your capture period is more than 8 hours, I assume&amp;nbsp;that&amp;nbsp;it's unknown when the problem will occur which requires a long running perfmon.&amp;nbsp; In this case, I recommend a sample period of 120 second interval.&amp;nbsp; The key is managing how rapidly the perfmon log (BLG file)&amp;nbsp; grows in size.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;Q: Shouldn't I set the log to overwrite instead of creating new BLG's during long running perfmon sample?&lt;/P&gt;
&lt;P mce_keep="true"&gt;A:&amp;nbsp;&amp;nbsp;This is personal preference but several conditions exists where you probably want to set the log to overwrite&lt;/P&gt;
&lt;P mce_keep="true"&gt;Conditions:&lt;/P&gt;
&lt;P mce_keep="true"&gt;1.&amp;nbsp; You are limited on available free space on directory holding the perfmon output (BLG files)&lt;/P&gt;
&lt;P mce_keep="true"&gt;2.&amp;nbsp; Your not sure when the performance problem will reproduce and it could take 2/3 days or even a few weeks.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;I will cover a nice in depth look of SPDiag in part 3 of Troubleshooting SharePoint Performance series.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9645764" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author><category term="SharePoint MOSS performance monitor log how to" scheme="http://blogs.msdn.com/russmax/archive/tags/SharePoint+MOSS+performance+monitor+log+how+to/default.aspx" /></entry><entry><title>Troubleshooting Security Only Crawl</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/russmax/archive/2009/02/09/troubleshooting-security-only-crawl.aspx" /><id>http://blogs.msdn.com/russmax/archive/2009/02/09/troubleshooting-security-only-crawl.aspx</id><published>2009-02-09T05:19:00Z</published><updated>2009-02-09T05:19:00Z</updated><content type="html">&lt;P&gt;&lt;STRONG&gt;What is Security Only Crawl?&lt;/STRONG&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;
&lt;P&gt;&lt;BR&gt;Before troubleshooting Security Only Crawl’s, let’s start out with what is a security only crawl?&amp;nbsp; Security Only crawl's take place when users are added/removed from&amp;nbsp;Sharepoint groups and/or explicitly added/removed from a list.&amp;nbsp;&amp;nbsp;When incremental crawl starts, these security changes, “Updated ACL’s”, must be pushed down to all affected items within the index.&amp;nbsp; We security trim these results.&lt;/P&gt;
&lt;P&gt;For Example, User A is able to search on all items in a specific document library named HR Docs.&amp;nbsp; You don’t want User A to be able to search and discover documents which were crawled previously from Document Library named HR Docs.&amp;nbsp; You remove User A from the only Sharepoint group that has permissions to view these documents and iniate an incremental crawl.&amp;nbsp; What will happen is that the security change will be discovered and the updated ACL will be processed.&amp;nbsp; The&amp;nbsp;gatherer will commit the security changes to all items within HR Docs library.&amp;nbsp; When the security only crawl is completed, User A will not return results for querying items within HR Docs library.&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp;&amp;nbsp; The items within the document library are not fetched but the security of the item is.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Troubleshooting Security only crawls?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is an interesting topic and one that is rarely documented which is the primary reason for this blog.&amp;nbsp; What would necessarily lead you down the path to troubleshooting security only crawls?&amp;nbsp; Well there are a few scenarios such as:&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;1.)&amp;nbsp; User A is still able to search and return items which he shouldn’t be due to being removed from Sharepoint groups.&lt;/P&gt;
&lt;P&gt;2.)&amp;nbsp; User A is not able to search items even though he was recently added to a Sharepoint group with rights to the items in question. &lt;/P&gt;
&lt;P&gt;3.)&amp;nbsp;&amp;nbsp;Incremental crawls are intermittently taking a long time to crawl very few items.&lt;/P&gt;
&lt;P&gt;Scenario&amp;nbsp;three is more frequent and tends to cause the most confusion for Sharepoint Administrators so I’ll discuss this in more detail.&amp;nbsp; What you will learn from scenario&amp;nbsp;three should help you in troubleshooting scenarios&amp;nbsp;one and two.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Scenario 3:&amp;nbsp; My incremental crawls are taking longer than expected to crawl a very small # of items.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You perform an incremental crawl which takes 30 minutes.&amp;nbsp; You perform an incremental crawl the following day and crawl the same # of items and it takes 3 hours.&amp;nbsp; This starts to become a trend and typically raises a red flag.&amp;nbsp;&amp;nbsp; The other symptom is that the crawl status page within Central Administrator will appear as crawling with no items updated for a long period of time.&amp;nbsp; Eventually, the crawl status will update with crawl complete.&amp;nbsp; The assumption is that the crawler appears to be getting hung or stuck during these long incremental crawls.&amp;nbsp; The problem is that you really don’t know if the crawler is still running or not.&amp;nbsp; I typically see the above symptoms when security only crawls are taking place.&amp;nbsp; Please keep in mind their are several moving parts to the&amp;nbsp;incremental crawl process and I'm just identifying a common one.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp; There is no easy way to tell if a security only crawl is running.&amp;nbsp; The reason is because the search status page doesn’t log any security related events.&amp;nbsp; The only thing you will see is that it’s still crawling.&lt;/P&gt;
&lt;P&gt;How can you verify that security only crawls are running?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I found two methods to assists in determining if security only crawls are occurring.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Method 1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Whenever a document is added/removed or User is added/removed from a group, this change gets logged in the change log “eventcache table” within that associated content database.&amp;nbsp; Please see my original blog in determining which content database you should be checking the change log post incremental crawl period.&amp;nbsp; The key is comparing the change log between short/long incremental crawls to see what’s different between the two.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The eventtypes column within Eventcache table contains the type of changes that the crawler will enumerate through during incremental crawl time.&amp;nbsp; &lt;BR&gt;This is one way to determine if security only crawls are contributing to your long crawl times.&amp;nbsp; You will need to query the eventtype column for all events that were part of your long running incremental crawl.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;You would be looking for event types 4194304 and 2097152.&lt;BR&gt;&amp;nbsp; &lt;BR&gt;2097152 - “A user is added to a Sharepoint Group”&lt;BR&gt;4194304 - “A user is deleted from a Sharepoint Group” &lt;/P&gt;
&lt;P&gt;Steps are the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;A.) Dump the MSSCrawlHistory from Search database table and look for the latest Crawl's with Status 11 (One long running and one that ran quickly)&lt;/P&gt;
&lt;P&gt;B.)&amp;nbsp; The screen shot shows me Crawl ID 8162 and 8165 "I'll use these crawl ID's in my example"&lt;/P&gt;
&lt;P&gt;C.) Next, open the MSSChangeLogCookies table within the Search DB and you'll see something like the following for the corresponding crawl ID's gathered from reviewing the MSSCrawlHistory table:&lt;/P&gt;
&lt;P&gt;ChangeLogCookie_old&amp;nbsp;will contain:&lt;/P&gt;
&lt;P&gt;1;0;&lt;STRONG&gt;888eef75-d584-4edf-b242-f5161d4c3c44&lt;/STRONG&gt;;633686171531600000;&lt;STRONG&gt;2564&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;ChangeLogCookie_new will contain:&lt;/P&gt;
&lt;P&gt;1;0;&lt;STRONG&gt;888eef75-d584-4edf-b242-f5161d4c3c44;&lt;/STRONG&gt;633686187284500000&lt;STRONG&gt;;2577&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It’s important to understand the bold values above.&amp;nbsp; The long Guid “888eef75-d584-4edf-b242-f5161d4c3c44” is the actual database were crawling against. This is important because this is the content database where you’ll need to query the eventcache table for the batch of changes processed during this crawl.&amp;nbsp; To find the actual database value you can run something like the following against Config DB:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;select * from objects with (NOLOCK) where ID = '888eef75-d584-4edf-b242-f5161d4c3c44'&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The last 4 digits &lt;STRONG&gt;2564&lt;/STRONG&gt; and &lt;STRONG&gt;2577&lt;/STRONG&gt; are the changes from the eventcache table that the crawler processed.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;D.)&amp;nbsp;&amp;nbsp;&amp;nbsp; Next, You want to run a query against the eventcache table and output to a file:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Select * from eventcache with (NOLOCK) where ID BETWEEN 2564 AND 2577&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;E.)&amp;nbsp;Perform the above steps for both short/long running incremental crawls and compare the&amp;nbsp;differences from the eventcache output via Step D.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Conclusion from Method 1:&amp;nbsp; If you see eventtypes 4194304 and 2097152 only during your long running incremental crawls, it’s a fairly safe bet to say that the security only crawls are the issue.&amp;nbsp; I would combine both methods to confirm that 99 %.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Method 2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When the crawl log stops reporting events and appears hung again you should open the ULS logs on the indexer and see a ton of events like the following: &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;04:21.0&amp;nbsp; mssearch.exe (0x092C)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x09A8 Search Server Common&amp;nbsp;&amp;nbsp;&amp;nbsp; GathererSql&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; Medium&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CGatherer::CommitTransaction succeeded, URL sts3://site/siteurl=/siteid={ee7f629c-a36c-4327-b5f1-0652878fa4a3}/weburl=docs/webid={ba2b56ba-27d1-4cfb-90b4-e638d3f3b0ed}/&lt;STRONG&gt;listid={4d587236-3886-440f-a0d7-0d33622724cd&lt;/STRONG&gt;}/folderurl=/&lt;STRONG&gt;itemid=27&lt;/STRONG&gt;, CrawlID 51, &lt;STRONG&gt;SourceDocID 229&lt;/STRONG&gt; - File:d:\office\source\search\search\gather\server\gatherobj.cxx Line:9449&lt;/EM&gt; &lt;BR&gt;&lt;BR&gt;This event tells us that the gatherer is busy committing transactions to the index.&amp;nbsp; You’ll notice some subtle differences between the events.&amp;nbsp; For Example:&amp;nbsp;Itemid and SourceDocID will be different for every event.&lt;/P&gt;
&lt;P&gt;The goal is finding out the following about the event:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.) What exactly is being committed to the index? &lt;BR&gt;2.) Was this an item that was actually added/changed?&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;To figure out which item is being hit you would run the following SQL queries based on the SourceDocID, List ID, and ItemID.&amp;nbsp; I use the above event as an example: &lt;/P&gt;
&lt;P&gt;Query 1 against SearchDB: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;select * from MSSCrawlURL where docID = '229'&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;"Look at the DisplayURL and see what URL it's hitting as this usually includes a file name" &lt;/P&gt;
&lt;P&gt;Query 2 against ContentDB: &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;select * from AllDocs where listid = '4d587236-3886-440f-a0d7-0d33622724cd' and doclibrowid = '27'&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;“Look at the LeafName and confirm this matches the same item as Query 1” &lt;/P&gt;
&lt;P&gt;Both of these queries should result in the same file.&amp;nbsp; I would run the above two queries on multiple events. Maybe grab like 10/20 items and then hit the Crawl logs after the crawl completed and see if these items were crawled. If not, then it’s very safe to say that security only crawls were taking place in addition to the method I provided earlier.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Why do security only crawls take so long?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The time difference in crawl can be attributed to expansion of the SharePoint Group and also that the group is at the site collection level and affects items beyond the list.&amp;nbsp; If a Sharepoint group has several thousand users at site collection level, you can see how this can be very expensive.&amp;nbsp; Also, a large number of items within that site collection can add to the delay because new ACL changes will be pushed down to every item affected by the security change.&lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;How can I work around this and prevent security only crawls from affecting incremental crawl times? &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Answer:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Instead of users explicitly added to Sharepoint groups, add AD groups instead.&amp;nbsp;&amp;nbsp; Managing adding/removing users from Active Directory security groups will not cause ACL changes within Sharepoint.&amp;nbsp; Because of this, no security only crawls will occur.&lt;/EM&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9407820" width="1" height="1"&gt;</content><author><name>Russmax</name><uri>http://blogs.msdn.com/members/Russmax.aspx</uri></author><category term="security only crawls sharepoint moss" scheme="http://blogs.msdn.com/russmax/archive/tags/security+only+crawls+sharepoint+moss/default.aspx" /></entry></feed>