<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Imagine Think Create Share : Search</title><link>http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx</link><description>Tags: Search</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>PauseCrawl vs PauseBackgroundActivity</title><link>http://blogs.msdn.com/carloshm/archive/2009/12/08/pausecrawl-vs-pausebackgroundactivity.aspx</link><pubDate>Mon, 07 Dec 2009 23:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9933790</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9933790.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9933790</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Just a comment about my &lt;A title="Manage the crawl of a content source" href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-manage-the-crawl-of-a-content-source-in-powershell.aspx" mce_href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-manage-the-crawl-of-a-content-source-in-powershell.aspx"&gt;pausecrawl powershell script&lt;/A&gt;. Although it seems clear the pausecrawl command pauses an active crawl for the content source; I get last week some questions about it.&lt;/P&gt;
&lt;P&gt;On the other hand, the &lt;A title=pausebackgroundactivity href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.administration.content.pausebackgroundactivity.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.administration.content.pausebackgroundactivity.aspx"&gt;PauseBackgroundActivity&lt;/A&gt;&amp;nbsp;pauses all content-related activity for a Shared Services Provider's search service.&lt;/P&gt;
&lt;P&gt;local vs global.&lt;/P&gt;
&lt;P&gt;adios!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9933790" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category></item><item><title>Follow SEO recommendations in your public SharePoint deployment</title><link>http://blogs.msdn.com/carloshm/archive/2009/11/25/follow-seo-recommendations-in-your-public-sharepoint-deployment.aspx</link><pubDate>Wed, 25 Nov 2009 16:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9928671</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9928671.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9928671</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Today I received a request about SEO recommendations in your SharePoint deployment. Well you should care about it always, no matter if it is SharePoint or not (although it would be better :)) In case you came from other dimension, search is the technology behind everything.&lt;/P&gt;
&lt;P&gt;Just to the spec, I wanted to share that information:&lt;/P&gt;
&lt;P&gt;"I would start caring about the content (SEO is content &lt;A title="MOSS SEO" href="http://mossseo.com/" mce_href="http://mossseo.com/"&gt;quality&lt;/A&gt;), and resolve features SharePoint doesn't have. You have a good pointer at &lt;A href="http://blog.mastykarz.nl/tag/seo/"&gt;http://blog.mastykarz.nl/tag/seo/&lt;/A&gt; , &lt;A href="http://blogs.technet.com/vedant/archive/2009/06/24/search-engine-optimization-in-sharepoint.aspx"&gt;http://blogs.technet.com/vedant/archive/2009/06/24/search-engine-optimization-in-sharepoint.aspx&lt;/A&gt; or &lt;A href="http://www.thesug.org/Blogs/sharepointseo/default.aspx"&gt;http://www.thesug.org/Blogs/sharepointseo/default.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the other hand I would work with tools as &lt;A title="IIS SEO Toolkit" href="http://www.iis.net/expand/SEOToolkit" mce_href="http://www.iis.net/expand/SEOToolkit"&gt;IIS SEO Toolkit&lt;/A&gt; to monitor the site."&lt;/P&gt;
&lt;P&gt;Finally it is recommended to check third &lt;A title="SEO kwizcom" href="http://kwizcom.com/ProductPage.asp?ProductID=1374&amp;amp;ProductSubNodeID=1424" mce_href="http://kwizcom.com/ProductPage.asp?ProductID=1374&amp;amp;ProductSubNodeID=1424"&gt;partner solutions&lt;/A&gt;&amp;nbsp;and any generic &lt;A title=Bing href="http://www.bing.com/search?q=Search+Engine+Optimization+Tips" mce_href="http://www.bing.com/search?q=Search+Engine+Optimization+Tips"&gt;SEO recommendations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;EM&gt;Nice to Read&lt;/EM&gt;&lt;/U&gt;&lt;BR&gt;Search Engine Optimization Starter Guide&lt;BR&gt;&lt;A href="http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf"&gt;http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf&lt;/A&gt;&lt;BR&gt;How to Optimize SharePoint Server 2007 Web Content Management Sites for Search Engines&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/cc721591.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc721591.aspx&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;Bye!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9928671" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/SEO/default.aspx">SEO</category></item><item><title>How to: Programmatically read the ChangeLog in PowerShell </title><link>http://blogs.msdn.com/carloshm/archive/2009/06/05/how-to-programmatically-read-the-changelog-in-powershell.aspx</link><pubDate>Fri, 05 Jun 2009 15:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9701271</guid><dc:creator>carloshm</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9701271.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9701271</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;When I was working to get &lt;A title="How to: Programmatically Export the Crawl History to a CSV File in PowerShell" href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx" mce_href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx"&gt;powershell&lt;/A&gt; &lt;A title="How to: Programmatically Manage the Crawl of a Content Source in PowerShell " href="http://blogs.msdn.com/controlpanel/blogs/how-to-programmatically-manage-the-crawl-of-a-content-source-in-powershell" mce_href="http://blogs.msdn.com/controlpanel/blogs/how-to-programmatically-manage-the-crawl-of-a-content-source-in-powershell"&gt;scripts&lt;/A&gt; from MSDN samples to get/set information, I created&amp;nbsp;too one for reading the changelog. It was a bit tricky to build, but I manage to port &lt;A title="Querying for Specific Changes" href="http://msdn.microsoft.com/en-us/library/bb447550.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb447550.aspx"&gt;Querying for specific changes&lt;/A&gt; to PowerShell.&lt;/P&gt;
&lt;P&gt;You can review the changelog&amp;nbsp;API in the Microsoft SharePoint Developer Documentation Team Blog and MSDN (previous link):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2008/01/21/synchronizing-with-windows-sharepoint-services-part-1.aspx"&gt;http://blogs.msdn.com/sharepointdeveloperdocs/archive/2008/01/21/synchronizing-with-windows-sharepoint-services-part-1.aspx&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/sharepointdeveloperdocs/archive/2008/01/22/synchronizing-with-windows-sharepoint-services-part-2.aspx"&gt;http://blogs.msdn.com/sharepointdeveloperdocs/archive/2008/01/22/synchronizing-with-windows-sharepoint-services-part-2.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;We wanted to monitor which changes were been read by the crawl process and been able to filter specific changes.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;## SharePoint Reference [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") &lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:Get-ChangeLog($url, $minutes, $changetype)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$startTime = [System.DateTime]::Now.Subtract([System.TimeSpan]::FromMinutes($minutes));&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$db_id = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("get_Id");&lt;BR&gt;&amp;nbsp;$result_id = $db_id.Invoke($s.ContentDatabase, "instance,public", $null, $null, $null);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$db_CurrentChangeToken = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("get_CurrentChangeToken");&lt;BR&gt;&amp;nbsp;$result_CurrentChangeToken = $db_CurrentChangeToken.Invoke($s.ContentDatabase, "instance,public", $null, $null, $null);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$startToken = New-Object Microsoft.SharePoint.SPChangeToken([Microsoft.SharePoint.SPChangeCollection+CollectionScope]::ContentDB, $result_id.ToString(), $startTime);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$changeQuery = New-Object Microsoft.SharePoint.SPChangeQuery($False, $False);&lt;BR&gt;&amp;nbsp;$changeQuery.User = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.ContentType = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Add = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Delete = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Field = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.File = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Folder = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Group = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.GroupMembershipAdd = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.GroupMembershipDelete = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Item = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.List = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Move = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Rename = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Site = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.SystemUpdate = $True;&lt;BR&gt;&amp;nbsp;$changeQuery.Update = $True;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$changeQuery.ChangeTokenStart = $startToken;&lt;BR&gt;&amp;nbsp;$changeQuery.ChangeTokenEnd = $result_CurrentChangeToken;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;$db_GetChanges = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("GetChanges", [Microsoft.SharePoint.SPChangeQuery]);&lt;BR&gt;&amp;nbsp;$result_GetChanges = $db_GetChanges.Invoke($s.ContentDatabase, "instance,public", $null, $changeQuery, $null);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;write-Output $result_GetChanges | Where-Object { $_.ChangeType -eq $changetype };&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Get-ChangeLog -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -minutes 120 -changetype Add&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Take into account that the time will get changes based on UTC&lt;/P&gt;
&lt;P&gt;Bye!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701271" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Codeplex/default.aspx">Codeplex</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Powershell/default.aspx">Powershell</category></item><item><title>Sharepoint: supportability scenarios</title><link>http://blogs.msdn.com/carloshm/archive/2009/03/31/sharepoint-supported-scenarios.aspx</link><pubDate>Wed, 01 Apr 2009 00:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9524442</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9524442.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9524442</wfw:commentRss><description>&lt;P&gt;Today I posted some samples about Search and Powershell integration. I mention about the supportability of querying sharepoint tables. I thought about it and I wanted to clarify my point of view and what is public &amp;amp; published.&lt;/P&gt;
&lt;P&gt;I have listed the main areas (I'm primarly&amp;nbsp;focusing on Office12) where I have seen supportability questions. If you have any question, please call your support contact or access &lt;A href="http://support.microsoft.com/"&gt;http://support.microsoft.com/&lt;/A&gt; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A title="Support for changes to the databases that are used by Office server products and by Windows SharePoint Services" href="http://support.microsoft.com/kb/841057" mce_href="http://support.microsoft.com/kb/841057"&gt;Support for changes to the databases that are used by Office server products and by Windows SharePoint Services&lt;/A&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A title="Information about the Maintenance Plan Wizard in SQL Server 2005 and about tasks that administrators can perform against SharePoint databases" href="http://support.microsoft.com/kb/932744/" mce_href="http://support.microsoft.com/kb/932744/"&gt;Information about the Maintenance Plan Wizard in SQL Server 2005 and about tasks that administrators can perform against SharePoint databases&lt;/A&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A title="Hardware virtualization support for SharePoint products and technologies" href="http://support.microsoft.com/kb/909840" mce_href="http://support.microsoft.com/kb/909840"&gt;Hardware virtualization support for SharePoint products and technologies&lt;/A&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A title="Supported and unsupported scenarios for working with custom site definitions and custom area definitions in Windows SharePoint Services, in SharePoint Portal Server 2003, and in Office SharePoint Server 2007" href="http://support.microsoft.com/kb/898631" mce_href="http://support.microsoft.com/kb/898631"&gt;Supported and unsupported scenarios for working with custom site definitions and custom area definitions in Windows SharePoint Services, in SharePoint Portal Server 2003, and in Office SharePoint Server 2007&lt;/A&gt;&lt;/STRONG&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;On the other hand, there are articles as &lt;A title="SharePoint Database Access" href="http://msdn.microsoft.com/en-us/library/bb861829.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb861829.aspx"&gt;SharePoint Database Access&lt;/A&gt;&amp;nbsp;where it is recommended to not query database but instead use the object model.&lt;/P&gt;
&lt;P&gt;Looking back to the scenario of my &lt;A title=reference href="http://blogs.msdn.com/controlpanel/blogs/htt%20p://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx#comment01_carloshm" mce_href="htt p://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx#comment01_carloshm"&gt;original comment&lt;/A&gt;&amp;nbsp;if you are debugging with the SQL Profiler your SSP Database and at the same time running the powershell script or getting the crawl history, you will see something like:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SP:Starting Event&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;exec dbo.proc_MSS_GetCrawlHistory @ContentSourceID=NULL,@MaxRecords=NULL,@BeginTime=NULL,@EndTime=NULL,@CrawlStatus=NULL &lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;SP:StmtCompleted&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;SELECT A.CrawlID,A.CrawlType,B.ContentSourceID,A.Status,A.StartTime,A.EndTime,CAST(A.SuccessCount as int) as SuccessCount,A.ErrorCount,A.WarningCount from MSSCrawlHistory as A inner join (select distinct CrawlID,ContentSourceID from MSSCrawlContent) as B on A.CrawlID = B.CrawlID WHERE A.ProjectID = 1 AND DATEDIFF([Day], A.StartTime, GETDATE()) &amp;lt;= 7 ORDER BY A.EndTime DESC&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;So you may think: "as these tables are not heavy used, a directly querying with some changes may&amp;nbsp;have less locking, we should follow that", something that you may test only in you lab/dev environment.&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;SELECT&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CrawlID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CrawlType&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;B&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ContentSourceID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;Status&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;StartTime&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;EndTime&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;&lt;FONT color=#ff00ff size=2&gt;CAST&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;SuccessCount &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; SuccessCount&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ErrorCount&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;WarningCount &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; MSSCrawlHistory &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;with&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;nolock&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;inner&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;join&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;distinct&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; CrawlID&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ContentSourceID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; MSSCrawlContent &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;with&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;nolock&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; B &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;on&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CrawlID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; B&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;CrawlID &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;WHERE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;ProjectID &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 1 &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;AND&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;&lt;FONT color=#ff00ff size=2&gt;DATEDIFF&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;[Day]&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;StartTime&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff00ff size=2&gt;&lt;FONT color=#ff00ff size=2&gt;GETDATE&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;())&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; 7 &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;ORDER&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;BY&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; A&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&lt;FONT color=#808080 size=2&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;EndTime &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;DESC&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Just thinking in the task, this may seems better, but think about the possibility that committed data may be a requirement.&lt;/P&gt;
&lt;P&gt;Finally,&amp;nbsp;should you&amp;nbsp;&lt;EM&gt;TSQL&lt;/EM&gt; your sharepoint database? I would say no, as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You may affect overall response of your environment&lt;/LI&gt;
&lt;LI&gt;Unless you have enough information through our &lt;A title="Open Specification Program" href="http://msdn.microsoft.com/en-us/library/cc339473.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc339473.aspx"&gt;open specification program&lt;/A&gt;&amp;nbsp;you may conflict with you EULA acceptance.&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;What would be better, querying or using the object model?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Working with the object model gives you supportability for your &lt;STRONG&gt;&lt;EM&gt;code &lt;/EM&gt;&lt;/STRONG&gt;as you won't have breaking changes (backward compatibility) or you will be advised about deferred/obsolete code and have migration paths. something that using TSQL you won't have.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Namaste!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9524442" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/support/default.aspx">support</category></item><item><title>How to: Programmatically Manage the Crawl of a Content Source in PowerShell </title><link>http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-manage-the-crawl-of-a-content-source-in-powershell.aspx</link><pubDate>Tue, 31 Mar 2009 19:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9523361</guid><dc:creator>carloshm</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9523361.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9523361</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;If you have read my &lt;A title="How to: Programmatically Export the Crawl History to a CSV File in PowerShell " href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx" mce_href="http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx"&gt;previous post&lt;/A&gt; you may think, why did you stop there? Well, that is what I thought too&amp;nbsp;:), and started with &lt;A title="How to: Programmatically Manage the Crawl of a Content Source" href="http://msdn.microsoft.com/en-us/library/aa679491.aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa679491.aspx"&gt;this article&lt;/A&gt; from MSDN.&lt;/P&gt;
&lt;P&gt;We wanted to start managing the crawling of our content source more programmatically, as we have seen that running several at the same time affects the overall process.&lt;/P&gt;
&lt;P&gt;So running these powershell scripts as scheduled task and monitoring the status can improve in crawling.&lt;/P&gt;
&lt;P&gt;You may improve them reusing the context and content sources and&amp;nbsp;doing some &lt;EM&gt;pipeline&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to be included in the overall file:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;## SharePoint Reference&lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") &lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To start an incremental crawl of the content source&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:StartIncremental-Crawl($url, $csname)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs = $sc.ContentSources[$csname];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs.StartIncrementalCrawl();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;StartIncremental-Crawl -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -csname "your content source name"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To start a full crawl of the content source&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:StartFull-Crawl($url, $csname)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs = $sc.ContentSources[$csname];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs.StartFullCrawl();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;StartFull-Crawl -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -csname "your content source name"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To pause a crawl in process&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:Pause-Crawl($url, $csname)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs = $sc.ContentSources[$csname];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs.PauseCrawl();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Pause-Crawl -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -csname "your content source name"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To resume a paused crawl&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:Resume-Crawl($url, $csname)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs = $sc.ContentSources[$csname];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs.ResumeCrawl();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Resume-Crawl -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -csname "your content source name"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To stop a crawl of the content source&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:Stop-Crawl($url, $csname)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs = $sc.ContentSources[$csname];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$cs.StopCrawl();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Stop-Crawl -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; -csname "your content source name"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;To check the crawl status values for a content source&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;function global:Get-CrawlStatus($url)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Write-Output $sc.ContentSources;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Get-CrawlStatus -url &lt;A href="http://your_site_url/"&gt;http://your_site_url&lt;/A&gt; | Format-Table -property CrawlStatus, CrawlStarted, CrawlCompleted&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9523361" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Codeplex/default.aspx">Codeplex</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Powershell/default.aspx">Powershell</category></item><item><title>How to: Programmatically Export the Crawl History to a CSV File in PowerShell</title><link>http://blogs.msdn.com/carloshm/archive/2009/03/31/how-to-programmatically-export-the-crawl-history-to-a-csv-file-in-powershell.aspx</link><pubDate>Tue, 31 Mar 2009 18:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9523116</guid><dc:creator>carloshm</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9523116.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9523116</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;When I came across the article at MSDN &lt;A title="Crawl History to a CSV" href="http://msdn.microsoft.com/en-us/library/cc789570.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc789570.aspx"&gt;How to: Programmatically Export the Crawl History to a CSV File&lt;/A&gt;&amp;nbsp;I thought I would never create such a tool just for that specific feature, as you end up with additional requirements in order to create an admin tool.&lt;/P&gt;
&lt;P&gt;But today I needed to get data from crawl history, and I didn't want to get them from SQL (remember it is not supported ;)&lt;A title=comment01_carloshm name=comment01_carloshm&gt;&lt;/A&gt;), so I started to write down a simple powershell script to do it. And then I realized that for this atomic actions, indeed it is a great options!: you give admin people multiple commands that they can use/combine to monitor/get information about the environment (and yes many, many things more)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;## SharePoint Reference&lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") &lt;BR&gt;[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server") &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;function global:Get-CrawlHistory($url)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trap [Exception] {&lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.GetType().FullName); &lt;BR&gt;&amp;nbsp;&amp;nbsp;write-error $("ERROR: " + $_.Exception.Message); &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;continue;&amp;nbsp; &amp;nbsp;&lt;BR&gt;&amp;nbsp;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s = new-Object Microsoft.SharePoint.SPSite($url);&lt;BR&gt;&amp;nbsp;$c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);&lt;BR&gt;&amp;nbsp;$h = new-Object Microsoft.Office.Server.Search.Administration.CrawlHistory($c);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Write-OutPut $h.GetCrawlHistory();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;$s.Dispose();&lt;BR&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then you can just execute: Get-CrawlHistory -url &lt;A href="http://your_site_url/"&gt;http://your_site_url/&lt;/A&gt; | &lt;A title=Export-Csv href="https://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/export-csv.mspx" mce_href="https://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/export-csv.mspx"&gt;Export-Csv&lt;/A&gt; your_path_and_file_name&lt;/P&gt;
&lt;P&gt;Then you can import to excel and make some charts.&lt;/P&gt;
&lt;P&gt;In order to filter the information some useful columns should be denormalized: CrawlType, ContentSourceID, Status.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9523116" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Codeplex/default.aspx">Codeplex</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/HowTo/default.aspx">HowTo</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Powershell/default.aspx">Powershell</category></item><item><title>Information Design for MOSS</title><link>http://blogs.msdn.com/carloshm/archive/2008/10/23/information-design-for-moss.aspx</link><pubDate>Thu, 23 Oct 2008 05:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9012242</guid><dc:creator>carloshm</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9012242.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9012242</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I was reading today Stephen&amp;nbsp;P. Anderson's &lt;A title="Information Design" href="http://apperceptive.com/infodesign.pdf" mce_href="http://apperceptive.com/infodesign.pdf"&gt;book&lt;/A&gt;&amp;nbsp;and then I realized that Information Architecture is to &lt;A title=Findability href="http://admincompanion.mindsharp.com/BillBlog/Lists/Posts/Post.aspx?ID=110" mce_href="http://admincompanion.mindsharp.com/BillBlog/Lists/Posts/Post.aspx?ID=110"&gt;Findability&lt;/A&gt;&amp;nbsp;what Information Design is to &lt;EM&gt;Understandability.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;We focus on the type of information we present to the user, in order to be completely relevant, but I do&amp;nbsp;not really see focus on innovative/automatic ways to "communicate ideas, illustrate information or express relationships".&lt;/P&gt;
&lt;P&gt;Microsoft, Yahoo or Google, as many start-ups work to improve this areas. There were &lt;A title="Yahoo shortcuts" href="http://tools.search.yahoo.com/newsearch/resources" mce_href="http://tools.search.yahoo.com/newsearch/resources"&gt;shortcuts&lt;/A&gt;, &lt;A title="timeline, map" href="http://www.google.com/experimental/" mce_href="http://www.google.com/experimental/"&gt;alternate views&lt;/A&gt;, or &lt;A title=photosynth href="http://photosynth.net/Default.aspx" mce_href="http://photosynth.net/Default.aspx"&gt;browsing experiences&lt;/A&gt;&amp;nbsp;and many more; but I would like to see Search Land to include this concept in depth.&lt;/P&gt;
&lt;P&gt;Imagine a future search product&amp;nbsp;that based on the user question shows, depending on the type of information, knowledge of the user, and relevant information; different type of representation in order to maximize the interaction with him/her.&lt;/P&gt;
&lt;P&gt;Would it be possible to build a PoC based on (MOSS/FAST) to manage that?&lt;/P&gt;
&lt;P&gt;How would it look like?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Federation webparts that shows information in a &lt;A title="Search Community Toolkit" href="http://blogs.msdn.com/enterprisesearch/archive/2008/04/01/add-virtual-earth-interactive-maps-to-your-search-server-site.aspx" mce_href="http://blogs.msdn.com/enterprisesearch/archive/2008/04/01/add-virtual-earth-interactive-maps-to-your-search-server-site.aspx"&gt;map&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;RSS Media exposed on video queries.&lt;/LI&gt;
&lt;LI&gt;DeepZoom Image with &lt;A title=NewsMap href="http://www.marumushi.com/apps/newsmap/" mce_href="http://www.marumushi.com/apps/newsmap/"&gt;size data blocks resizing&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A title=BurstLabs href="http://www.burstlabs.com/" mce_href="http://www.burstlabs.com/"&gt;Audio &lt;/A&gt;clustering&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Cheers!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9012242" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/Research/default.aspx">Research</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>Global Asset Picker - SharePoint</title><link>http://blogs.msdn.com/carloshm/archive/2008/10/02/global-asset-picker-sharepoint.aspx</link><pubDate>Thu, 02 Oct 2008 02:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8972422</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/8972422.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=8972422</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Did you get in trouble finding elements through OOB features with hundreds (or thousands) of hundreds of documents/pages? I think this is something everybody meet sooner or later in a SharePoint environment.&lt;/P&gt;
&lt;P&gt;I have several opportunities to improve Asset Picker, but the way it is built (based on a Browse &amp;amp; Find instead of Search concept) it was really difficult to hack it&amp;nbsp;and make it globally available.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the end we got to a scenario with too many custom development to be able to accomplish this solution.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms543215.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms543215.aspx&lt;/A&gt;&lt;BR&gt;&lt;A href="http://sharepointbergen.blogspot.com/2007/09/modifying-asset-picker-dialog-in.html"&gt;http://sharepointbergen.blogspot.com/2007/09/modifying-asset-picker-dialog-in.html&lt;/A&gt;&lt;BR&gt;&lt;A href="http://sharepointkb.wordpress.com/2008/09/10/asset-picker-browse-field-control/"&gt;http://sharepointkb.wordpress.com/2008/09/10/asset-picker-browse-field-control/&lt;/A&gt;&lt;BR&gt;&lt;A href="http://blog.mastykarz.nl/adding-new-locations-to-the-look-in-dialog/"&gt;http://blog.mastykarz.nl/adding-new-locations-to-the-look-in-dialog/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;So, did I find any other suggestion to improve authoring/editing experience?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Imagine&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Been able to Search&amp;nbsp;for content inside&amp;nbsp;MOSS/WSS without moving through several windows, and using search&amp;nbsp;built-in capabilities, just&amp;nbsp;right where you are editing.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Think&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A Feature deployed through a Solution package, that contains a delegate control&amp;nbsp;begin&amp;nbsp;included in the Additional&amp;nbsp;Page Header. This control manage a modal css window, that allows the user to search and filter results from a form control.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Options for the "client engine" would be:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://sublog.subimage.com/2006/01/01/subModal"&gt;http://sublog.subimage.com/2006/01/01/subModal&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.huddletogether.com/projects/lightbox/"&gt;http://www.huddletogether.com/projects/lightbox/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://jquery.com/demo/thickbox/"&gt;http://jquery.com/demo/thickbox/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://famspam.com/facebox"&gt;http://famspam.com/facebox&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx"&gt;http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Personally, I would choose JQuery (even before it was going to &lt;A title="JQuery &amp;amp; Microsoft" href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" mce_href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx"&gt;be included&lt;/A&gt; in VS :))&lt;/P&gt;
&lt;P&gt;Adios!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8972422" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category></item><item><title>SearchMonkey, OpenCalais and MOSS</title><link>http://blogs.msdn.com/carloshm/archive/2008/08/21/searchmonkey-opencalais-and-moss.aspx</link><pubDate>Thu, 21 Aug 2008 01:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8882620</guid><dc:creator>carloshm</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/8882620.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=8882620</wfw:commentRss><description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;This is something I really wanted to start including in my public projects (and&amp;nbsp;I will do), as certainly Search will need to improve in coming years.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.cuil.com/"&gt;www.cuil.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.powerset.com/"&gt;www.powerset.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.wikia.com/"&gt;www.wikia.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Yahoo with &lt;A title=BOSS href="http://developer.yahoo.com/search/boss/" mce_href="http://developer.yahoo.com/search/boss/"&gt;BOSS&lt;/A&gt; and &lt;A title=SearchMonkey href="http://developer.yahoo.com/searchmonkey/" mce_href="http://developer.yahoo.com/searchmonkey/"&gt;SearchMonkey&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.searchme.com/"&gt;www.searchme.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.songza.com/"&gt;www.songza.com&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;just check above examples, and you will see.&lt;/P&gt;
&lt;P&gt;Well this post was just to show you the example of OpenCalais integration with MOSS: &lt;A href="http://www.opencalais.com/MOSS"&gt;http://www.opencalais.com/MOSS&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Open Calais allows you to add semantic metadata to content already in your environment. A very nice way to improve editors usability, as you can see in &lt;A title=Tagaroo href="http://tagaroo.opencalais.com/" mce_href="http://tagaroo.opencalais.com/"&gt;tagaroo&lt;/A&gt; wordpress plugin.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;How does it work?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;It installs (through solutions+features):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Custom List&lt;/LI&gt;
&lt;LI&gt;Custom WebPart&lt;/LI&gt;
&lt;LI&gt;Events Receivers to Documents and Page Library (ItemDeleting, ItemCheckedIn, ItemAdded and ItemUpdated events)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;and when an item is created/updated and so on, the OpenCalais Webservice is called, with the information from the file (via WebRequest) and related metadata is stored in the Custom List.The custom webpart gets the current item, and it searchs for the metadata into the Custom List, so calls to the webservice are made only in editing state.&lt;/P&gt;
&lt;P&gt;Finally as the rendering of the custom webpart matches UserAgent of Search Engine Bots, it will only display that rich information to bots matching those rules.&lt;/P&gt;
&lt;P&gt;By default this rule has Yahoo bot, in order to be relevant to SearchMonkey initiative with microformats.&lt;/P&gt;
&lt;P&gt;Adios!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8882620" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Search/default.aspx">Search</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category></item></channel></rss>