<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Adventures in SPWonderland.</title>
  <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/" />
  <link rel="self" href="http://blogs.flexnetconsult.co.uk/colinbyrne/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2012-02-22T22:10:42.8041924+00:00</updated>
  <author>
    <name>Colin Byrne</name>
  </author>
  <subtitle>Taking apart and putting back together</subtitle>
  <id>http://blogs.flexnetconsult.co.uk/colinbyrne/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Case Sensitive MindF**k Part 1 SharePoint not indexing TWiki</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2012/02/22/CaseSensitiveMindFkPart1SharePointNotIndexingTWiki.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,dff8f41f-541a-41e2-a465-4d020ccea683.aspx</id>
    <published>2012-02-22T22:10:42.8041924+00:00</published>
    <updated>2012-02-22T22:10:42.8041924+00:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <category term="WTF" label="WTF" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,WTF.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So we’re setting up a crawl of a TWiki site as one source in a suite of content sources.
</p>
        <p>
So far so good, once the authentication was sorted we noticed a problem, only the
root Url of the site was getting crawled. 
</p>
        <p>
Various ideas were thrown around about nofollow and noindex attributes but we couldn’t
find anything wrong with our configuration and nothing seemed to fit the problem.
</p>
        <p>
I noticed that this particular TWiki installation was case sensitive to Urls by accident
(thought those days were gone, configurable apparently) and that got me thinking. 
</p>
        <p>
By kicking a crawl off i noticed that SharePoint was requesting lower case urls from
the Site for every link on the home page getting a 404 and stopping. 
</p>
        <p>
Ok penny drops but why is SharePoint sending a lower case url, well… this is by design
as part of the crawler’s normalization of urls (<a href="http://blogs.msdn.com/b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepoint-server-2010.aspx">http://blogs.msdn.com/b/enterprisesearch/archive/2010/07/09/crawling-case-sensitive-repositories-using-sharepoint-server-2010.aspx</a>) 
</p>
        <p>
In 2010 if you’re setting up a crawl rule that checkbox you’ve ignored called Match
Case (badly named surely Preserve Url Casing would get the point across better) just
needs to be set and viola the crawler will preserve the case of Urls it requests.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=dff8f41f-541a-41e2-a465-4d020ccea683" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Fix: Azure Dev Environment not starting</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2011/10/13/FixAzureDevEnvironmentNotStarting.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,fc531b14-54c5-4996-9ede-8c0db734b0ec.aspx</id>
    <published>2011-10-13T13:43:36.1415665+01:00</published>
    <updated>2011-10-13T13:43:36.1415665+01:00</updated>
    <category term="Azure" label="Azure" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Azure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
So we have a development VM thats pretty fully loaded with software, Sharepoint 2010,
Project Server 2010 and CRM 2011. 
</p>
        <p>
For some reason the First Azure project on this machine refused to deploy to the local
development App Fabric. The deployment hung and never completed.
</p>
        <p>
 <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/Do%20You%20Want%20to%20Wait_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Do You Want to Wait" border="0" alt="Do You Want to Wait" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/Do%20You%20Want%20to%20Wait_thumb.png" width="244" height="101" /></a></p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/StartWindowsAzure_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="StartWindowsAzure" border="0" alt="StartWindowsAzure" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/StartWindowsAzure_thumb.png" width="244" height="76" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Nothing was posted in the event logs but there were items in the VS output screen
about failing to write to the logs. Nice.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogFiles_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="LogFiles" border="0" alt="LogFiles" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogFiles_thumb.png" width="244" height="13" />
          </a>
        </p>
        <p>
A search for those files found lots of Azure log folders in %localappdata%\dftmp
</p>
        <p>
 <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogfileLocation_2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="LogfileLocation" border="0" alt="LogfileLocation" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/LogfileLocation_thumb.png" width="244" height="138" /></a></p>
        <p>
In DFAgentLogs and the DFAgent.log file I found this 
</p>
        <p>
          <font size="1">[2011/10/13, 10:46:12.145,  INFO, 00011572] There is already a
listener on IP endpoint 0.0.0.0:808.  Make sure that you are not trying to use
this endpoint multiple times in your application and that there are no other applications
listening on this endpoint. 
<br />
[2011/10/13, 10:46:12.639,  INFO, 00011572]    at System.ServiceModel.Channels.SocketConnectionListener.Listen() 
<br />
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen() 
<br />
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen() 
<br />
   at System.ServiceModel.Channels.TransportManager.Open..</font>
        </p>
        <p>
 
</p>
        <p>
Now we’re getting somewhere, the App Fabric Development Agent is trying to listen
on port 808 and failing as another process has this port in use
</p>
        <p>
A netstat –ano command shows the process id that is listening on that port 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/NetStat_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="NetStat" border="0" alt="NetStat" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/NetStat_thumb.png" width="244" height="46" />
          </a>
        </p>
        <p>
The Tasklist command tasklist /fi “PID eq 11400” shows that an exe call SMSVCHost.exe
is listening on port 808
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSvcHost_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SMSvcHost" border="0" alt="SMSvcHost" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSvcHost_thumb.png" width="244" height="32" />
          </a>
        </p>
        <p>
Thats the Net.TCP Port Sharing service. So the port sharing service is stopping a
port being used. Marvellous.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSVCHostService_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SMSVCHostService" border="0" alt="SMSVCHostService" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/Windows-Live-Writer/Azure_B286/SMSVCHostService_thumb.png" width="217" height="244" />
          </a>
        </p>
        <p>
I’m not sure which of the installed software set that service to automatically start.
</p>
        <p>
After stopping the service and restarting the Development Fabric the deployment succeeded.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=fc531b14-54c5-4996-9ede-8c0db734b0ec" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Fix for Zune Error 80040154</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2011/10/01/FixForZuneError80040154.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,2ca64661-a8ec-486e-ba16-8dff71c0deb5.aspx</id>
    <published>2011-10-01T20:12:47.345+01:00</published>
    <updated>2011-10-01T20:12:47.3455421+01:00</updated>
    <category term="Zune" label="Zune" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Zune.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <br />
If you've installed Zune on a Server OS like Windows 2008 by running the zune-x64.msi
directly as shown by Rob Mensching<br /><a href="http://robmensching.com/blog/posts/2009/9/12/How-to-install-Zune-software-on-Windows-2008-R2">http://robmensching.com/blog/posts/2009/9/12/How-to-install-Zune-software-on-Windows-2008-R2</a> you
probably will get error 80040154 when checking for phone updates in Zune
</p>
        <p>
The error means a COM component is not registered, its looking for a component with
a CLSID of {31055FF4-9B90-42D6-9672-468E3ADE9583}
</p>
        <p>
To fix this in the Zune Packages directory (where you ran the Zune install from) run
zunewmdu-x64 (or zunewmdu-x86.msi) as Administrator and you should be able to update
your Windows 7 Phone
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=2ca64661-a8ec-486e-ba16-8dff71c0deb5" />
      </div>
    </content>
  </entry>
  <entry>
    <title>SPEndpointAddressNotFoundException error in Dashboard Designer</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2010/07/17/SPEndpointAddressNotFoundExceptionErrorInDashboardDesigner.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,25ce755a-61f2-4d4c-9a45-36a4874de89c.aspx</id>
    <published>2010-07-17T19:30:04.972+01:00</published>
    <updated>2010-07-17T19:30:04.972556+01:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <span lang="EN-GB">
          <p>
            <font size="2">
            </font> 
</p>
          <p>
When using PerformancePoint Designer in SharePoint 2010 and trying to add a new item
say a SQL Server connection you might get the error 'An Unexpected Error Occured.
An error has been logged for the Administrator'
</p>
          <p>
If you check the Event log on your client machine you should find a more detailed
but equally cryptic error.
</p>
          <p>
            <font size="1">An unexpected error occurred. Error 15568.</font>
          </p>
          <p>
            <font size="1">Exception details:</font>
          </p>
          <p>
            <font size="1">Microsoft.SharePoint.SPEndpointAddressNotFoundException: There are
no addresses available for this application.</font>
          </p>
          <p>
            <font size="1">at Microsoft.SharePoint.SPRoundRobinServiceLoadBalancer.BeginOperation()</font>
          </p>
          <p>
            <font size="1">at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.GetBalancerContext()</font>
          </p>
          <p>
            <font size="1">at Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplicationProxy.ExecuteOnChannel(CodeBlock
codeBlock)</font>
          </p>
          <p>
            <font size="1">
            </font> 
</p>
          <p>
            <font size="2">First check in Central Administration check you have a PerformancePoint
Services application created.</font>
          </p>
          <p>
My problem was that although the services application was created the service instance
itself was not running. Goto Central Admin - System Settings - Manage Services on
Server and make sure the PerformancePoint service is started or start it youself.
</p>
          <p>
Why you are not given the option in the Services App to do this automatically
is a mystery to me. 
</p>
          <p>
 
</p>
          <p>
 
</p>
          <p>
 
</p>
        </span>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=25ce755a-61f2-4d4c-9a45-36a4874de89c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>SPMetal doesn't like spaces</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2010/07/13/SPMetalDoesntLikeSpaces.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,343879a8-c784-4d93-a1ea-38f68756acbf.aspx</id>
    <published>2010-07-13T22:28:32.357+01:00</published>
    <updated>2010-07-13T22:28:32.3571695+01:00</updated>
    <category term="SharePoint 2010" label="SharePoint 2010" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,SharePoint%2B2010.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
Currently when generating a class with SPMetal from a site that has spaces in it
</p>
        <p>
SPMetal.exe  /web:"http://flxdev2010:19000/PWA/Test Plan" /namespace:ProjectSite
/code:ProjectSite.cs
</p>
        <p>
It will give
</p>
        <p>
          <font color="#ff0000">Error the web at 'http://flxdev2010:19000/PWA/Test Plan' could
not be found</font>
        </p>
        <p>
Oh dear, a schoolboy error.
</p>
        <p>
Now you could use stsadm to dump out the site, delete and reimport, yikes. Or you
can just rename the Url as ServerRelativeUrl is read/write (any outside links
point to the Url will not be fixed up!)
</p>
        <p>
Using a quick console app 
</p>
        <p>
          <br />
            using (<span style="COLOR: #2b91af">SPSite</span> site = <span style="COLOR: blue">new</span> <span style="COLOR: #2b91af">SPSite</span>("<span style="COLOR: #a31515">http://flxdev2010:19000/PWA/Test Plan"</span>))
</p>
        <p>
            using( <span style="COLOR: #2b91af">SPWeb</span> web = site.OpenWeb())
</p>
        <p>
            {<br />
               <span style="COLOR: blue">string</span> s = web.ServerRelativeUrl;<br />
               web.ServerRelativeUrl = <span style="COLOR: #a31515">"/PWA/TestPlan"</span>;<br />
               web.Update();
</p>
        <p>
            }
</p>
        <p>
or that new fangled 4 year old PowerShell thingy
</p>
        <p>
          <span class="content">
            <span style="MARGIN-LEFT: 0px !important" class="block">
              <code class="functions">
                <font color="#996666">Start-SPAssignment</font>
              </code>
              <code class="color1">
                <font color="#996666">-Global</font>
              </code>
            </span>
          </span>
        </p>
        <div class="line alt2">
          <span class="content">
            <span style="MARGIN-LEFT: 0px !important" class="block">
              <code class="variable">
                <font color="#996666">$web</font>
              </code>
              <font color="#996666">
                <code class="plain">= </code>
                <code class="functions">Get-SPWeb</code>
              </font>
              <code class="string">
                <font color="#996666">"</font>
                <a href="http://server/sites/web">
                  <font color="#6699cc">http://flxdev2010:19000/PWA/Test
Plan</font>
                </a>
                <font color="#996666">"</font>
              </code>
            </span>
          </span>
        </div>
        <div class="line alt1">
          <span class="content">
            <span style="MARGIN-LEFT: 0px !important" class="block">
              <font color="#996666">
                <code class="variable">$web</code>
                <code class="plain">.Title
= </code>
                <code class="string">"/PWA/TestPlan"</code>
              </font>
            </span>
          </span>
        </div>
        <div class="line alt2">
          <span class="content">
            <span style="MARGIN-LEFT: 0px !important" class="block">
              <font color="#996666">
                <code class="variable">$web</code>
                <code class="plain">.Update() </code>
              </font>
            </span>
          </span>
        </div>
        <div class="line alt1">
          <span class="content">
            <span style="MARGIN-LEFT: 0px !important" class="block">
              <code class="functions">
                <font color="#996666">Stop-SPAssignment</font>
              </code>
              <code class="color1">
                <font color="#996666">-Global</font>
              </code>
            </span>
          </span>
        </div>
        <p>
SPMetal.exe  /web:"http://flxdev2010:19000/PWA/TestPlan" /namespace:ProjectSite
/code:ProjectSite.cs
</p>
        <p>
now works.
</p>
        <p>
you can change it back once you have the definition.
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=343879a8-c784-4d93-a1ea-38f68756acbf" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PowerShell quickie: Extract the feature IDs used in large SharePoint projects</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2009/06/16/PowerShellQuickieExtractTheFeatureIDsUsedInLargeSharePointProjects.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,fe815927-3c14-4837-94f7-41d6125f3345.aspx</id>
    <published>2009-06-16T15:10:27.5431971+01:00</published>
    <updated>2009-06-16T15:10:27.5431971+01:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
You know how it is, you start developing a project and then 6 months later you look
back and realise you have to document everything you've produced. 
</p>
        <p>
I've just gone through that process and need a quick list of all the features ids
scattered around various subdirectories of a large project.
</p>
        <p>
sample:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;Feature
Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"886f12cf-97ca-4789-baf8-6f13f9f2cedf"</span> Title=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO
Contract Management Project Upgrade"</span> Description=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Feature
that upgrades Project Sites for Contract Management."</span> Version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"12.0.0.0"</span> Hidden=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"FALSE"</span> Scope=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Web"</span> DefaultResourceFile=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"core"</span> ReceiverAssembly=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO_CM_Project_Upgrade,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=aa0408b86137366a"</span> ReceiverClass=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO_CM_Project_Upgrade.PGPSO_CM_Project_Upgrade"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>&gt;</span>
        </pre>
        <p>
Firing up Powershell navigating to the root of the solution folders and running
this command gets me the list 
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">gci
-recurse -filter feature.xml <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">|</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">%</span> {
$contents=get-content $_.fullname; $x=[XML]$contents; <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{0}
{1}"</span> -f $x.Feature.Id, $x.feature.title }</span>
        </pre>
        <p>
result:
</p>
        <p>
          <img src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/ListFeatures.png" border="0" />
        </p>
        <p>
 
</p>
        <p>
gci is an alias for get-childitem which allow you to recurse subfolders and provide
a filter parameter. Then use get-content to open the file, convert to an XML object
and then directly reference the Id and title of the feature.xml file.
</p>
        <p>
 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=fe815927-3c14-4837-94f7-41d6125f3345" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Changing ODC links in Excel Services from code</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/11/20/ChangingODCLinksInExcelServicesFromCode.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,f401df03-48ec-4ff9-91e5-8bbded266ff6.aspx</id>
    <published>2008-11-20T22:07:24.705+00:00</published>
    <updated>2008-11-20T22:08:37.2867251+00:00</updated>
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <br />
        <br />
One of my coworkers on a current project has posted a useful entry about fixing a
problem you will have when deploying Excel files into Excel Services across multiple
farms that use connections in external ODC files. The fix is to use crack open the
excel file using OpenXml and change the URL to the ODC link. Nice one Oriol. Details <a href="http://oricode.wordpress.com/2008/11/17/excel-services-deployment-changing-data-connection-libraries-url-from-code/">here</a><br /><br /><br /><br /><br /><br /><img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=f401df03-48ec-4ff9-91e5-8bbded266ff6" /></div>
    </content>
  </entry>
  <entry>
    <title>Full Text Searching your CS and PowerShell code with SharePoint Search</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/06/23/FullTextSearchingYourCSAndPowerShellCodeWithSharePointSearch.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,869a1436-3b78-404c-a538-5eb20fe971aa.aspx</id>
    <published>2008-06-23T11:56:49.426061+01:00</published>
    <updated>2008-06-23T11:58:36.77462+01:00</updated>
    <category term="search" label="search" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,search.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_22.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="287" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
Recently I went through the process of indexing a subversion source code repository
with SharePoint. I thought I'd share those steps as OOTB SharePoint won't index ps1,
cs or vb files.
</p>
        <p>
Setting up search to index these files works either if the files themselves live in
a document library or are external to SharePoint. The process to index files from
other source control systems will vary depending on how you can get access to the
source files. If you need to index SourceSafe you can set up what's called a mirror
directory that automatically save the files from your repositories on disk and I suspect
you can index Team Foundation Server via its Web Access URL's although I've not tried
that.
</p>
        <p>
The subversion side of things is pretty easy, pick the repository you want and export
the latest version using the svn client i.e. svn export svn://devhosting/svn/webparts
d:\SVNExport\webparts. Script the export of each repository and then schedule it. 
</p>
        <p>
On the SharePoint side you set up a new content source to crawl the directories. 
</p>
        <p>
In this case the Indexing is on a separate machine so we enter the UNC path. Make
sure the content access account has read rights to the share. If needed you can setup
separate credentials for this source.
</p>
        <p>
In the SSP on the Search Setting page, click <strong>New Content Source</strong> under <strong>Content
source and crawl schedules</strong></p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image12.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image12_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image15.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="230" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image15_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
The problem now is if you start a full crawl typically only the .txt files are indexed
as the SharePoint indexers have no idea what to do with file extensions it doesn't
recognise. 
</p>
        <p>
There are a couple of steps to getting new file extensions indexed. This assumes you
are a Search Service administrator.
</p>
        <p>
          <strong>First add the extension to File Types</strong>
        </p>
        <p>
1. On the Search Administration page, click <strong>File Types</strong> under <strong>Crawling</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_14.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="436" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_6.png" width="356" border="0" />
          </a>
        </p>
        <p>
2. On the Manage File Types page, click <strong>New File Type</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_18.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="284" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_8.png" width="598" border="0" />
          </a>
        </p>
        <p>
3. On the Add File Type page, type the file name extension in the <strong>File extension</strong> box
for the file type that you want to add.<br />
To search for PowerShell files, type ps1 
<br />
Do not include the period (.) character in front of the file name extension. 
</p>
        <p>
4.Click <strong>OK</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_16.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="248" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_7.png" width="520" border="0" />
          </a>
        </p>
        <p>
5. Rinse and repeat for each file type that you want to add. 
</p>
        <p>
The second step in getting the file extensions recognised is to add it to the registry
entries the SharePoint Server Search service reads when it starts up. This key is
located at 
</p>
        <p>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension 
</p>
        <p>
Add a new key, enter the extension including the dot i.e. .ps1.
</p>
        <p>
Save and set its default value to be {4A3DD7AB-0A6B-43B0-8A90-0D8B0CC36AAB}. This
means use the text parser Ifilter tquery.dll for this extension.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_12.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="221" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_5.png" width="644" border="0" />
          </a>
        </p>
        <p>
And a new key for each file extension you want indexed in this case cs,ps1 and aspx
but you can add vb vbs or whatever other text files you need indexed.
</p>
        <p>
Stop and start the search service with these commands
</p>
        <p>
net stop osearch
</p>
        <p>
net start osearch
</p>
        <p>
Now do a full crawl of your content type and your files should have been full text
indexed. The crawl log is useful in seeing if the filtering barfed on your files.
</p>
        <p>
 
</p>
        <p>
Now you can go to the Search Center enter your keyword and get a list of code files
back.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_6.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="464" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_2.png" width="718" border="0" />
          </a>
        </p>
        <p>
Here I've set up a custom scope, search page, and added a custom search tab so separate
the code results on its own. I won't go into it here but there is a <a href="http://www.zimmergren.net/archive/tags/Search%20Scope/default.aspx" target="_blank">good
post here</a> that shows how you do this.
</p>
        <p>
Even better with SharePoint Search if you know you want PowerShell files only you
can enter the fileextension keyword and search will filter out everything but PowerShell
files.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_20.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="321" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_9.png" width="799" border="0" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Searching your entire code repository with subsecond query times is now pretty easy.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=869a1436-3b78-404c-a538-5eb20fe971aa" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PowerShell Quickie - What version of SharePoint 2007 am I running?</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/04/05/PowerShellQuickieWhatVersionOfSharePoint2007AmIRunning.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,7f3fbe8b-9c67-4daf-87ac-7521180202b1.aspx</id>
    <published>2008-04-05T22:14:18.3193852+01:00</published>
    <updated>2008-04-05T22:14:18.3193852+01:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
PowerShell Quickie - What version of SharePoint 2007 am I running? 
</p>
        <p>
  
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(get-item <span style="color: #006080">"hklm:software\microsoft\shared
tools\web server extensions\12.0"</span>).getvalue(<span style="color: #006080">"version"</span>)
12.0.0.6219 </pre>
        </div>
        <p>
Also handy 
</p>
        <p>
What version of the Operating system am I running on? 
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(Get-WmiObject Win32_OperatingSystem).Caption 

Microsoft(R) Windows(R) Server 2003, Standard Edition 
</pre>
        </div>
        <p>
        </p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(Get-WmiObject Win32_OperatingSystem).Version 

5.2.3790
</pre>
        </div>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=7f3fbe8b-9c67-4daf-87ac-7521180202b1" />
      </div>
    </content>
  </entry>
</feed>
