<?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">Eric Kraus' SharePoint/.NET Blog</title><subtitle type="html">What the field says about MOSS.</subtitle><id>http://blogs.msdn.com/ekraus/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/ekraus/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-06-12T16:31:25Z</updated><entry><title>SP2010: SPFarm.Local is null or Web Application could not be found</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/11/13/sp2010-spfarm-local-is-null-or-web-application-could-not-be-found.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/11/13/sp2010-spfarm-local-is-null-or-web-application-could-not-be-found.aspx</id><published>2009-11-13T09:25:44Z</published><updated>2009-11-13T09:25:44Z</updated><content type="html">&lt;p&gt;Note: This post applies to SharePoint Server 2010 Beta 2 and Visual Studio Ultimate Beta 2.   &lt;br /&gt;    &lt;br /&gt;I ran into two issues today that had me tied up for a few hours so I thought I would share.&amp;#160; The first was simple:&lt;/p&gt;  &lt;p&gt;SPFarm _farm = SPFarm.Local;&amp;#160;&amp;#160; However, the _farm object was being returned as null.&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/1_farmNull_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="1_farmNull" border="0" alt="1_farmNull" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/1_farmNull_thumb.jpg" width="504" height="373" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;The second was again simple:    &lt;br /&gt;    &lt;br /&gt;SPSite _site = new SPSite(“http://teams”);&amp;#160;&amp;#160; This line errored with:&amp;#160;&amp;#160; &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/2_WebAppCantBeFound_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="2_WebAppCantBeFound" border="0" alt="2_WebAppCantBeFound" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/2_WebAppCantBeFound_thumb.jpg" width="504" height="260" /&gt;&lt;/a&gt;     &lt;br /&gt;     &lt;br /&gt;&lt;em&gt;The Web Application at &lt;/em&gt;&lt;a href="http://teams"&gt;&lt;em&gt;http://teams&lt;/em&gt;&lt;/a&gt;&lt;em&gt; could not be found.&amp;#160; Verify that you have typed the URL correctly.&amp;#160; If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.     &lt;br /&gt;      &lt;br /&gt;&lt;/em&gt;First, notice that by default, Visual Studio compiles in x86.&amp;#160; Since SharePoint is running in x64, this would definitely be a good place to start.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/3_CompilingIn86_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="3_CompilingIn86" border="0" alt="3_CompilingIn86" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/3_CompilingIn86_thumb.jpg" width="404" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;However, there is no x64 platform to compile to by default   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/4_No64_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="4_No64" border="0" alt="4_No64" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/4_No64_thumb.jpg" width="404" height="169" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;What we need to do is create an x64 platform and copy existing settings from x86.&amp;#160; We’ll do this by entering the Configuration Manager.&amp;#160; Once in the Configuration Manager, select the platform drop down and choose New.   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/5_CreateNew_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="5_CreateNew" border="0" alt="5_CreateNew" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/5_CreateNew_thumb.jpg" width="504" height="444" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Choose the new platform to be “x64” and choose to copy settings from x86.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/6_New64_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="6_New64" border="0" alt="6_New64" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/6_New64_thumb.jpg" width="404" height="257" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;After you click OK, ensure the settings on your projects are change to use the new platform “x64”   &lt;br /&gt;    &lt;br /&gt;Close out of Configuration Manager and ensure you are now building in x64.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/8_BuildingIn64_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="8_BuildingIn64" border="0" alt="8_BuildingIn64" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/8_BuildingIn64_thumb.jpg" width="304" height="89" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Lastly, try your project again.&amp;#160; That should have solved it.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/9_Worked_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="9_Worked" border="0" alt="9_Worked" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/SP2.LocalisnullorWebApplicationcouldnotb_3026/9_Worked_thumb.jpg" width="504" height="198" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;     &lt;br /&gt;Note:&amp;#160; you may also receive this error if you do not have permissions to the configuration database while developing a Windows Forms or WPF application.&amp;#160; Ensure that the account you are developing on has appropriate permissions to the config database.&amp;#160; If you are running a web client (web part, etc.), ensure that its app pool account has the same permissions to the read from the database.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Special thanks to Tajeshwar for his help in resolve this.   &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921841" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint/default.aspx" /><category term="Development" scheme="http://blogs.msdn.com/ekraus/archive/tags/Development/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /><category term="Visual Studio 2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/Visual+Studio+2010/default.aspx" /></entry><entry><title>SharePoint 2010 Development Hands On Labs</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/11/12/sharepoint-2010-development-hands-on-labs.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/11/12/sharepoint-2010-development-hands-on-labs.aspx</id><published>2009-11-13T05:52:15Z</published><updated>2009-11-13T05:52:15Z</updated><content type="html">&lt;p&gt;These HOLs are about a month old now, but I wanted to share them for anyone who missed the announcement at SPC.&amp;#160; There are 10 Hands On Labs in both C# and Visual Basic for SharePoint 2010 Beta 2.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=c010fc68-b47f-4db6-b8a8-ad4ba33a35c5" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=c010fc68-b47f-4db6-b8a8-ad4ba33a35c5"&gt;http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=c010fc68-b47f-4db6-b8a8-ad4ba33a35c5&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, I have set up several tags in Diigo for SharePoint , you can find my “SharePoint2010” bookmarks here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.diigo.com/user/erickraus/sharepoint2010" href="http://www.diigo.com/user/erickraus/sharepoint2010"&gt;http://www.diigo.com/user/erickraus/sharepoint2010&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I update links to this site daily.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9921770" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint/default.aspx" /><category term="Development" scheme="http://blogs.msdn.com/ekraus/archive/tags/Development/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /></entry><entry><title>SharePoint 2010 Provisioning A New Farm with PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/11/06/sharepoint-2010-provisioning-a-new-farm-with-powershell.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/11/06/sharepoint-2010-provisioning-a-new-farm-with-powershell.aspx</id><published>2009-11-06T21:35:14Z</published><updated>2009-11-06T21:35:14Z</updated><content type="html">&lt;p&gt;This post will take you down the process of configuring your SharePoint farm while introducing the new administrative functionality shipping in the PowerShell provider.    &lt;br /&gt;    &lt;br /&gt;During the SharePoint Installation, make sure you choose “&lt;strong&gt;Server Farm”&lt;/strong&gt; and then “&lt;strong&gt;Complete&lt;/strong&gt;” install.&amp;#160; This will allow you to create a SharePoint &lt;u&gt;farm&lt;/u&gt; rather than a standalone server.     &lt;br /&gt;    &lt;br /&gt;After the install completes, the setup program will ask you if you want to run the SharePoint Technologies Configuration Wizard (default is checked).&amp;#160; Uncheck the box to &lt;strong&gt;NOT&lt;/strong&gt; run the wizard.     &lt;br /&gt;    &lt;br /&gt;Under the Start Menu, browse to &lt;strong&gt;Microsoft SharePoint 2010 Products&lt;/strong&gt;.&amp;#160; Right-click on &lt;strong&gt;SharePoint 2010 Management Shell&lt;/strong&gt; and choose &lt;strong&gt;Run as administrator&lt;/strong&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/0_StartPowerShell_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="0_StartPowerShell" border="0" alt="0_StartPowerShell" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/0_StartPowerShell_thumb.jpg" width="404" height="339" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;     &lt;br /&gt;Notice:&lt;/strong&gt; Since we have not created a farm yet, the shell will load with an error that the local farm is not accessible.&amp;#160; This is expected.     &lt;br /&gt;    &lt;br /&gt;Next, run the following command to create a new configuration database and central admin content database.&amp;#160; &lt;strong&gt;The main reason we are using this method, versus the GUI is because we can specify the central admin content database name.&lt;/strong&gt;&amp;#160; (In the GUI, you cannot specify the name and it is created with a GUID)&amp;#160; &amp;lt;—DBA’s hate this&lt;/p&gt;  &lt;div style="background-color: #ffffcc"&gt;New-SPConfigurationDatabase –DatabaseName “SharePoint2010_Config” –DatabaseServer “&amp;lt;db server&amp;gt;” –AdministrationContentDatabaseName “SharePoint2010_Admin_Content” –Passphrase (ConvertTo-SecureString “pass@word1” –AsPlaintext –Force) –FarmCredentials (Get-Credential)&lt;/div&gt;  &lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;Notice&lt;/strong&gt;: rather than hard coding the credential for the farm account, I am having PowerShell prompt me for it.&amp;#160; You can also do this with the passphrase by accessing the “Password” property of the of the credential object:&amp;#160; (Get-Credential).Password&amp;#160; &lt;p&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/1_NewConfigDB_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="1_NewConfigDB" border="0" alt="1_NewConfigDB" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/1_NewConfigDB_thumb.jpg" width="604" height="506" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;After the process runs, you can test that the server has not been added to a farm, by reloading the PowerShell window.&amp;#160; Close and repeat the “Run as administrator” step above.&amp;#160; It should load with no warning message.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/5_ReloadShowsFarmConnected_4.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="5_ReloadShowsFarmConnected" border="0" alt="5_ReloadShowsFarmConnected" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/5_ReloadShowsFarmConnected_thumb_1.jpg" width="504" height="256" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Next, we need to provision the central admin web application on our desired port.&amp;#160; This will also link up the web application with the admin content database we created in the previous step. &lt;/p&gt;  &lt;div style="background-color: #ffffcc"&gt;New-SPCentralAdministration -Port 1234 -WindowsAuthProvider &amp;quot;NTLM&amp;quot;&lt;/div&gt;  &lt;br /&gt;After that command completes, we now need to install the features on the server.&amp;#160; &lt;br /&gt;  &lt;br /&gt;  &lt;div style="background-color: #ffffcc"&gt;Install-SPFeature –AllExistingFeatures&lt;/div&gt;  &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/21_InstallFeatures_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="21_InstallFeatures" border="0" alt="21_InstallFeatures" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ConfiguringaNewSharePoint2010FarmTherigh_21E8/21_InstallFeatures_thumb.jpg" width="504" height="250" /&gt;&lt;/a&gt;   &lt;br /&gt;  &lt;br /&gt;Lastly, we need to install and provision the services onto the farm.   &lt;br /&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style="background-color: #ffffcc"&gt;Install-SPService&amp;#160; -Provision&lt;/div&gt;  &lt;br /&gt;&lt;strong&gt;DONE!&amp;#160; &lt;/strong&gt;Now, you can open up Internet Explorer to the central admin site/port you specified and you’re on your way!   &lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918828" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint/default.aspx" /><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /></entry><entry><title>PowerShell 2.0 Released!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/27/powershell-2-0-released.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/27/powershell-2-0-released.aspx</id><published>2009-10-27T20:35:58Z</published><updated>2009-10-27T20:35:58Z</updated><content type="html">&lt;p&gt;Windows Management Framework, which includes Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0, has been officially released today.&amp;#160; This down-level release is now supported for Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 operating systems.   &lt;br /&gt;    &lt;br /&gt;You can find the release here:&amp;#160; &lt;b&gt;&lt;i&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=151321"&gt;http://go.microsoft.com/fwlink/?LinkID=151321&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913690" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /></entry><entry><title>Free PowerShell eBook</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/26/free-powershell-ebook.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/26/free-powershell-ebook.aspx</id><published>2009-10-27T04:43:52Z</published><updated>2009-10-27T04:43:52Z</updated><content type="html">&lt;p&gt;For those wishing to get started on PowerShell, here is an excellent free eBook by Dr. Tobias Weltner, PowerShell MVP.    &lt;br /&gt;    &lt;br /&gt;&lt;a title="http://powershell.com/Mastering-PowerShell.pdf" href="http://powershell.com/Mastering-PowerShell.pdf"&gt;http://powershell.com/Mastering-PowerShell.pdf&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9913327" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /><category term="training" scheme="http://blogs.msdn.com/ekraus/archive/tags/training/default.aspx" /><category term="Book" scheme="http://blogs.msdn.com/ekraus/archive/tags/Book/default.aspx" /></entry><entry><title>Extending .NET Objects in PowerShell</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/26/extending-net-objects-in-powershell.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/26/extending-net-objects-in-powershell.aspx</id><published>2009-10-26T14:53:40Z</published><updated>2009-10-26T14:53:40Z</updated><content type="html">&lt;p&gt;One of the great features in PowerShell 2.0 is the ability to extend .NET object types to add additional custom properties and methods.&amp;#160; For instance, the type System.String does not have a property called IsANumber that returns whether or not the string is a number.&amp;#160; Typically, you would have to do a TryParse.&amp;#160; By extending the System.String object, we can add such property.    &lt;br /&gt;    &lt;br /&gt;Here’s how it works:     &lt;br /&gt;    &lt;br /&gt;We will create a custom XML file that will define the .NET object that we would like to extend and how we want to extend it.&amp;#160; Then, we will load that XML into our PowerShell session and the new methods/properties will be available to us.&amp;#160; &lt;br /&gt;    &lt;br /&gt;Types.ps1xml file, located at $pshome ships with PowerShell 2.0&amp;#160; It is a good place to look at example extensions.&amp;#160; Because this file is digitally signed, we cannot modify it directly, this is why we will create a custom XML file.     &lt;br /&gt;    &lt;br /&gt;Let’s get started.     &lt;br /&gt;    &lt;br /&gt;Open PowerShell by &lt;strong&gt;right clicking&lt;/strong&gt; and choosing “&lt;strong&gt;Run as Administrator&lt;/strong&gt;”     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ExtendingtheSharePoint2010PowerShellCmdl_85A0/RunAsAdmin_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="RunAsAdmin" border="0" alt="RunAsAdmin" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ExtendingtheSharePoint2010PowerShellCmdl_85A0/RunAsAdmin_thumb.jpg" width="244" height="231" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;This next step (which is actually three commands) will create a new XML file “MyCustomTypes.ps1xml” at the $pshome location,&amp;#160; (typically:&amp;#160; C:\Windows\System32\WindowsPowerShell\v1.0) and open it in Notepad.     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;$mycustfile = “$pshome\MyCustomTypes.ps1xml”; New-Item –ItemType File –Path $mycustfile; notepad $mycustfile      &lt;br /&gt;      &lt;br /&gt;Note:&lt;/strong&gt; we are using PowerShell 2.0 but the install location for that is called “1.0”     &lt;br /&gt;    &lt;br /&gt;Next, add the following XML to the notepad window that opened:     &lt;br /&gt;    &lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;     &lt;br /&gt;&amp;lt;Types&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;Type&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;System.String&amp;lt;/Name&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Members&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;ScriptProperty&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Name&amp;gt;IsANumber&amp;lt;/Name&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;GetScriptBlock&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $out = $null; [System.Double]::TryParse($this, [ref] $out)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/GetScriptBlock&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/ScriptProperty&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Members&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/Type&amp;gt;     &lt;br /&gt;&amp;lt;/Types&amp;gt;     &lt;br /&gt;    &lt;br /&gt;The &lt;strong&gt;$this &lt;/strong&gt;property is the current object of the type you are extending.&amp;#160; In our example it will always be a string, since we are extending the System.String object.     &lt;br /&gt;    &lt;br /&gt;Save and close Notepad     &lt;br /&gt;    &lt;br /&gt;Back in PowerShell type the following command to load the custom types xml file and give it higher precedence than any other loaded file:     &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;Update-TypeData -PrependPath $mycustfile&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Now, to test that the new property has been added, we can create a new string variable and check the &lt;strong&gt;IsANumber&lt;/strong&gt; property.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ExtendingtheSharePoint2010PowerShellCmdl_85A0/RunTest_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="RunTest" border="0" alt="RunTest" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/ExtendingtheSharePoint2010PowerShellCmdl_85A0/RunTest_thumb.jpg" width="513" height="155" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;Below are a few of the different types of extensibility that you can perform:     &lt;br /&gt;    &lt;br /&gt;&amp;lt;AliasProperty&amp;gt; – defines a new name for an existing property     &lt;br /&gt;&amp;lt;CodeMethod&amp;gt; – references a static method of a .NET class as a method for the object     &lt;br /&gt;&amp;lt;CodeProperty&amp;gt; – references a static method of a .NET class as a property for the object     &lt;br /&gt;&amp;lt;NoteProperty&amp;gt; – defines a property with a static value     &lt;br /&gt;&amp;lt;ScriptMethod&amp;gt; – defines a method whose output is the value of a script     &lt;br /&gt;&amp;lt;ScriptProperty&amp;gt; – defines a property whose output is the value of a script     &lt;br /&gt;    &lt;br /&gt;For more information:&amp;#160;&amp;#160; &lt;br /&gt;&lt;strong&gt;get-help about_types.ps1xml&lt;/strong&gt;&amp;#160; and&amp;#160; &lt;strong&gt;get-help update-typedata      &lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9912951" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="Object Model" scheme="http://blogs.msdn.com/ekraus/archive/tags/Object+Model/default.aspx" /><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /><category term="Development" scheme="http://blogs.msdn.com/ekraus/archive/tags/Development/default.aspx" /></entry><entry><title>SharePoint 2010: A Developer’s Top 15 List</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/19/sharepoint-2010-a-developer-s-top-15-list.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/19/sharepoint-2010-a-developer-s-top-15-list.aspx</id><published>2009-10-19T21:26:58Z</published><updated>2009-10-19T21:26:58Z</updated><content type="html">&lt;p&gt;Developers of SharePoint should be giddy with excitement in all of the tools and features coming out of Visual Studio 2010 and SharePoint Designer 2010.&amp;#160; Here are the biggest take-a-ways from Paul Andrew’s talk on the 2010 developer platform:&lt;/p&gt;  &lt;p&gt;1. “Save site as template” now exports as a WSP which can be imported into Visual Studio 2010 as a new project   &lt;br /&gt;    &lt;br /&gt;2. BDC is now Business Connectivity Services which supports full Create, Read, Update, Delete calls to sources, plus Office 2010 integration using new SharePoint Designer 2010 tools&amp;#160; &lt;br /&gt;    &lt;br /&gt;3.&amp;#160; LINQ to SharePoint to replace complex CAML queries in code.&amp;#160; Strongly typed, intelli-sense, joins and projections    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;4.&amp;#160; Developer Dashboard displays call stack, load time, and other valuable data to debug and review code    &lt;br /&gt;    &lt;br /&gt;5.&amp;#160; Relationships between lists, supporting cascade deletes (transactions are actually handled on SQL Server)    &lt;br /&gt;    &lt;br /&gt;6.&amp;#160; Large List?&amp;#160; No problem! Just be certain of data in views.&amp;#160; Use throttling and indexes for performance.&amp;#160; 10’s to 100’s of thousands of documents = no problem.    &lt;br /&gt;    &lt;br /&gt;7.&amp;#160; Column Validation – lets us add validation logic when defining columns    &lt;br /&gt;    &lt;br /&gt;8.&amp;#160; Client Object Model – simple API to Add, Retrieve, Update and Manage data.&amp;#160; Commands are batched for performance:    &lt;br /&gt;    &lt;br /&gt;ClientContext cnt = new ClientContext (“http://siteurl”);    &lt;br /&gt;Web site = context.Web;    &lt;br /&gt;context.Load(site);    &lt;br /&gt;context.ExecuteQuery();    &lt;br /&gt;site.Title = “Something New”;    &lt;br /&gt;site.Update();    &lt;br /&gt;context.ExecuteQuery();    &lt;br /&gt;    &lt;br /&gt;9.&amp;#160; Rest APIs – uses ADO.NET Data Services.&amp;#160; Out of the box services in SharePoint.&amp;#160; Retrieve data off of site in 3 lines of code.    &lt;br /&gt;    &lt;br /&gt;10.&amp;#160; Better Events and Workflow.&amp;#160; Event Receivers and Workflows now possible at the site scope level (workflow does not bind to a list).&amp;#160; Event receivers can run asynchronously    &lt;br /&gt;    &lt;br /&gt;11.&amp;#160; Easily build dialog forms using AJAX.&amp;#160; &lt;br /&gt;    &lt;br /&gt;12.&amp;#160; Silverlight web part out of the box. - code doesn’t need to run on server!!!    &lt;br /&gt;    &lt;br /&gt;13.&amp;#160; Sandboxed Solutions – can monitor counters on server (CPU, RAM, etc.) to automatically shutdown bad code.&amp;#160; Uses a proxy worker process so not direct access to Microsoft.SharePoint.dll    &lt;br /&gt;    &lt;br /&gt;14.&amp;#160; WSP is the unified developer platform (for both Site Collections and local machine)    &lt;br /&gt;    &lt;br /&gt;15.&amp;#160; Integration with Team Foundation Server (TFS):&amp;#160; work item tracking, source control, team build, manage test cases, automated testing, and load testing!    &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909451" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="Development" scheme="http://blogs.msdn.com/ekraus/archive/tags/Development/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /></entry><entry><title>PowerShell Cmdlets in SharePoint 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/19/powershell-cmdlets-in-sharepoint-2010.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/19/powershell-cmdlets-in-sharepoint-2010.aspx</id><published>2009-10-19T18:49:28Z</published><updated>2009-10-19T18:49:28Z</updated><content type="html">&lt;p&gt;You may have already heard that SharePoint 2010 will ship with a PowerShell provider that contains over &lt;a href="http://cglessner.blogspot.com/2009/10/early-look-at-sharepoint-2010.html" target="_blank"&gt;500 cmdlets&lt;/a&gt; for you to administer SharePoint. The killer though, is that these commandlets can be executed remotely with PowerShell 2.0 WinRM.&amp;#160; Awesome!&amp;#160; Don’t worry about STSADM, it will still be around to support existing administration scripts and utilities.&amp;#160; &lt;br /&gt;    &lt;br /&gt;You can load the PowerShell provider by typing:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;add-pssnapin Microsoft.SharePoint.PowerShell     &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;Much of what Christian (iLoveSharePoint) and I have worked on in &lt;a href="http://www.codeplex.com/sposhmod" target="_blank"&gt;SPoshMod&lt;/a&gt; for SharePoint 2007 supports the same pattern as the 2010 provider.&amp;#160; Verb-Noun, with SP prefix.&amp;#160;&amp;#160; Get-SPSite, Get-SPWeb, etc. &lt;/p&gt;  &lt;p&gt;What you may not know is that developers can add custom providers and deploy them to SharePoint.&amp;#160; You can do this by using the &lt;strong&gt;Microsoft.SharePoint.PowerShell&lt;/strong&gt;&amp;#160; namespace.&amp;#160; To distinguish a normal PowerShell cmdlet from a SharePoint cmdlet, an new abstract class has been added to the namespace called: &lt;strong&gt;SPCmdlet&lt;/strong&gt;&amp;#160; (other cmdlets inherit directly from PSCmdlet).&lt;/p&gt;  &lt;p&gt;More to come on this topic…&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909319" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /></entry><entry><title>Live Blogging from SharePoint Conference 2009</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/16/live-blogging-from-sharepoint-conference-2009.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/16/live-blogging-from-sharepoint-conference-2009.aspx</id><published>2009-10-16T14:55:01Z</published><updated>2009-10-16T14:55:01Z</updated><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I’ll be at SharePoint Conference 2009 and will be participating with &lt;a href="http://www.endusersharepoint.com/"&gt;EndUserSharePoint.com&lt;/a&gt; in their LiveBlogging sessions.&amp;#160; &lt;br /&gt;    &lt;br /&gt;Live blogging/twittering at SharePoint Conference 2009:     &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;iframe height="550" src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=bc9fdd22b8/height=550/width=380" frameborder="0" width="380" scrolling="no"&gt;&lt;a href="http://www.coveritlive.com/mobile.php?option=com_mobile&amp;amp;task=viewaltcast&amp;amp;altcast_code=bc9fdd22b8"&gt;SPC09 Live Blogs&lt;/a&gt;&lt;/iframe&gt;  &lt;br/&gt;&lt;iframe height="550" src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=aae5dcd2f4/height=550/width=380" frameborder="0" width="380" scrolling="no"&gt;&lt;a href="http://www.coveritlive.com/mobile.php?option=com_mobile&amp;amp;task=viewaltcast&amp;amp;altcast_code=aae5dcd2f4"&gt;#SPC09 Live Twitter&lt;/a&gt;&lt;/iframe&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9908213" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="Blogs" scheme="http://blogs.msdn.com/ekraus/archive/tags/Blogs/default.aspx" /><category term="social networking" scheme="http://blogs.msdn.com/ekraus/archive/tags/social+networking/default.aspx" /><category term="twitter" scheme="http://blogs.msdn.com/ekraus/archive/tags/twitter/default.aspx" /><category term="SharePoint2010" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint2010/default.aspx" /><category term="conference" scheme="http://blogs.msdn.com/ekraus/archive/tags/conference/default.aspx" /></entry><entry><title>SharePoint Conference 2009</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/10/16/sharepoint-conference-2009.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/10/16/sharepoint-conference-2009.aspx</id><published>2009-10-16T14:50:45Z</published><updated>2009-10-16T14:50:45Z</updated><content type="html">&lt;p&gt;I will be attending the SharePoint Conference in Las Vegas next week and wanted to share my schedule with those that might be interested in checking back for content.&amp;#160; &lt;strong&gt;I will be blogging on content throughout the event. &lt;/strong&gt;There may be multiple sessions listed under a given timeslot as I will be narrowing down content as I attend other sessions.&amp;#160; &lt;br /&gt;    &lt;br /&gt;I will be cross posting some content on my blog with &lt;a href="http://www.endusersharepoint.com/"&gt;EndUserSharePoint.com&lt;/a&gt;&amp;#160; more info can be found on my next blog post:     &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff0000" size="4"&gt;--&amp;gt; &lt;/font&gt;&lt;/strong&gt;&lt;a href="https://blogs.msdn.com/ekraus/archive/2009/10/16/live-blogging-from-sharepoint-conference-2009.aspx"&gt;&lt;font color="#ff0000" size="4"&gt;&lt;strong&gt;Live Blogging from SharePoint Conference 2009&lt;/strong&gt;&lt;/font&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;or on Twitter:&amp;#160;&amp;#160; &lt;a href="http://twitter.com/erickraus"&gt;http://twitter.com/erickraus&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Monday, October 19th, 2009      &lt;br /&gt;&lt;/strong&gt;9:00 AM&amp;#160; - Keynote: Unveiling Microsoft SharePoint 2010     &lt;br /&gt;Speaker: Steve Ballmer     &lt;br /&gt;10:30 AM&amp;#160; -&amp;#160; Keynote: Microsoft SharePoint 2010 Drilldown     &lt;br /&gt;Speaker: Jeff Teper     &lt;br /&gt;1:15 PM&amp;#160; -&amp;#160; Overview of the SharePoint 2010 Developer Platform     &lt;br /&gt;2:45 PM&amp;#160; -&amp;#160; &lt;br /&gt;SharePoint 2010 Administration: Part 1     &lt;br /&gt;Visual Studio 2010 SharePoint Development Tools Overview     &lt;br /&gt;4:30 PM&amp;#160; -&amp;#160; &lt;br /&gt;SharePoint 2010 Administration: Part 2     &lt;br /&gt;Overview of Social Computing in SharePoint 2010     &lt;br /&gt;Developing with SharePoint 2010 Sandboxed Solutions&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Tuesday, October 20th, 2009      &lt;br /&gt;&lt;/strong&gt;9:00 AM&amp;#160; -&amp;#160; &lt;br /&gt;Building Rich Internet Applications with Silverlight 3 and...     &lt;br /&gt;Advanced Web Part Development in Visual Studio 2010     &lt;br /&gt;Overview of Office 2010 for the IT Pro     &lt;br /&gt;10:30 AM&amp;#160; -&amp;#160; &lt;br /&gt;Building A Great Extranet: Proven Principles &amp;amp; Best Practices     &lt;br /&gt;Scaling SharePoint 2010 topologies for your organization     &lt;br /&gt;1:15 PM&amp;#160; -&amp;#160; &lt;br /&gt;SharePoint isn’t just for Servers anymore     &lt;br /&gt;Developing SharePoint 2010 Applications with the Client Object Model     &lt;br /&gt;Authentication and Authorization in SharePoint 2010     &lt;br /&gt;2:45 PM&amp;#160; -&amp;#160; Deep Dive into SharePoint 2010 My Sites and Social Networking...&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Wednesday, October 21th, 2009      &lt;br /&gt;&lt;/strong&gt;9:00 AM&amp;#160; -&amp;#160; Developing an Automated Site Management Lifecycle with SharePoint 2010     &lt;br /&gt;10:30 AM&amp;#160; -&amp;#160; Business Connectivity Services Runtime and Object Model Deep Dive     &lt;br /&gt;1:15 PM&amp;#160; -&amp;#160; Developing with REST and LINQ in SharePoint 2010     &lt;br /&gt;2:45 PM&amp;#160; -&amp;#160; &lt;br /&gt;Externalizing BLOB Storage in SharePoint 2010     &lt;br /&gt;Developing Social Applications with SharePoint 2010     &lt;br /&gt;4:30 PM&amp;#160; -&amp;#160; Advanced Development for Silverlight 3 in SharePoint 2010&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Thursday, October 22th, 2009      &lt;br /&gt;&lt;/strong&gt;9:00 AM&amp;#160; -&amp;#160; Unveiling New Management Tools for Administering SharePoint 2010     &lt;br /&gt;10:30 AM&amp;#160; -&amp;#160; Application Lifecycle Management for Developers in SharePoint 2010     &lt;br /&gt;12:00 PM&amp;#160; -&amp;#160; Upgrading SharePoint 2007 code to SharePoint 2010&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9908209" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author></entry><entry><title>Custom Site Definition Alternative</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/09/29/custom-site-definition-alternative.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/09/29/custom-site-definition-alternative.aspx</id><published>2009-09-29T21:50:39Z</published><updated>2009-09-29T21:50:39Z</updated><content type="html">&lt;p&gt;This came up for a recent customer, so thought I would share my solution as many people are not aware of this customization possibility.&amp;#160; The solution ultimately solved the problem that feature staplers activate features BEFORE any lists are provisioned on a site.&amp;#160; So, the only eloquent way to modify a list or list item is to create a new list template in a new site definition.&amp;#160; Here is an alternative solution to consider instead of supporting another site definition in your environment.    &lt;br /&gt;    &lt;br /&gt;When SharePoint shows you the list of site definitions available to create a new site, it compiles this list from the list of files in: 12 Hive\TEMPLATE\1033\XML\&amp;#160;&amp;#160;&amp;#160; SharePoint will collectively pull all of the contents in the files named: webtemp*.xml and display a list of available site definitions.&amp;#160; By creating your own webtempcustom.xml you can effectively add site definitions to the list of choices at the ‘create’ screen. (nothing new here)    &lt;br /&gt;    &lt;br /&gt;However, you don’t necessarily &lt;em&gt;have to&lt;/em&gt; create a site definition along with your webtemp*.xml file.&amp;#160; Instead, you can call custom code to build your site to your needs and return that site to the provisioning process.&amp;#160; This can be accomplished by leveraging the &lt;strong&gt;SPWebProvisioningProvider&lt;/strong&gt; class when a new site is created.&amp;#160; This class, which is inherited from, is specified in your webtempcustom.xml file.    &lt;br /&gt;    &lt;br /&gt;Here is an example of a webtempcustom.xml file with the provisioning class specified:    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/7b3af2bdce7a_9856/webtempcustom_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="webtempcustom" border="0" alt="webtempcustom" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/7b3af2bdce7a_9856/webtempcustom_thumb.png" width="554" height="187" /&gt;&lt;/a&gt;     &lt;br /&gt;And the provisioning class:    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/7b3af2bdce7a_9856/provisioningprovider_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="provisioningprovider" border="0" alt="provisioningprovider" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/7b3af2bdce7a_9856/provisioningprovider_thumb.png" width="554" height="343" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now, just deploy your xml file to the 12\TEMPLATE\1033\XML folder and your compiled DLL to the GAC.&amp;#160; When the site is created, it will still be created with the STS#0 (or the template you apply in your code.&amp;#160; Essentially, eliminating the dependency on any other site definitions.   &lt;br /&gt;    &lt;br /&gt;Another thought, you could even add the ProvisionAssembly and ProvisionClass to an existing template entry such as STS to override the provisioning process for an existing site definition.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900926" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint/default.aspx" /><category term="Object Model" scheme="http://blogs.msdn.com/ekraus/archive/tags/Object+Model/default.aspx" /><category term="Deployment" scheme="http://blogs.msdn.com/ekraus/archive/tags/Deployment/default.aspx" /><category term="AppDev" scheme="http://blogs.msdn.com/ekraus/archive/tags/AppDev/default.aspx" /><category term="Features" scheme="http://blogs.msdn.com/ekraus/archive/tags/Features/default.aspx" /><category term="Development" scheme="http://blogs.msdn.com/ekraus/archive/tags/Development/default.aspx" /><category term="template" scheme="http://blogs.msdn.com/ekraus/archive/tags/template/default.aspx" /><category term="site definition" scheme="http://blogs.msdn.com/ekraus/archive/tags/site+definition/default.aspx" /></entry><entry><title>Twin Cities SharePoint Camp v3</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/09/09/twin-cities-sharepoint-camp-v3.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/09/09/twin-cities-sharepoint-camp-v3.aspx</id><published>2009-09-09T19:41:31Z</published><updated>2009-09-09T19:41:31Z</updated><content type="html">&lt;p&gt;Here’s a great (FREE) opportunity to attend a day-long workshop completely dedicated to SharePoint.&amp;#160; Come learn from developers, IT Pros, consultants, and local companies who have implemented SharePoint and have a story to share.   &lt;br /&gt;    &lt;br /&gt;I will be presenting again this year on one of my favorite topics, PowerShell.&amp;#160; Here is an abstract of the session:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;PowerShell Administration and Development in SharePoint     &lt;br /&gt;&lt;/b&gt;    &lt;br /&gt;PowerShell is a hot topic for SharePoint 2007 and will be even more for 2010.&amp;#160; Discover the power of PowerShell 2.0 and PowerGUI as they are used to perform advanced administrative &amp;amp; development tasks in SharePoint.&amp;#160; This session will start with a brief introduction to PowerShell scripting and continue with a look into helpful SharePoint scripts including: filtering event and ULS logs, managing sites and users, streamlining feature development, managing web parts, working with the object model, and much more!&amp;#160; Both administrators and developers will benefit from this powerful discussion.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;More information, and steps to register, can be found here:&amp;#160; &lt;a title="http://twincitiessharepointcamp.com/" href="http://twincitiessharepointcamp.com/"&gt;http://twincitiessharepointcamp.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope to see you there!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9893171" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="SharePoint" scheme="http://blogs.msdn.com/ekraus/archive/tags/SharePoint/default.aspx" /><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /><category term="community" scheme="http://blogs.msdn.com/ekraus/archive/tags/community/default.aspx" /></entry><entry><title>Microsoft Certification Discounts</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/09/01/microsoft-certification-discounts.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/09/01/microsoft-certification-discounts.aspx</id><published>2009-09-01T21:26:32Z</published><updated>2009-09-01T21:26:32Z</updated><content type="html">&lt;p align="center"&gt;   &lt;br /&gt;&lt;/p&gt; &lt;a href="http://www.microsoft.com/learning/careeroffers"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="exams" border="0" alt="exams" src="http://blogs.msdn.com/blogfiles/ekraus/WindowsLiveWriter/MicrosoftCertificationDiscounts_BD04/exams_3.png" width="504" height="182" /&gt;&lt;/a&gt;   &lt;br /&gt;  &lt;br /&gt;For those looking to ramp up on a new technology or finally add that certifications under your belt, here is a great offer from Microsoft.&amp;#160; You can save up to 20% on MCTS exams through the end of the year.  &lt;br /&gt;  &lt;br /&gt;This offer is available worldwide while supplies last, and you have to register, schedule and purchase your discounted exam by December 31, 2009.&amp;#160;&amp;#160;&amp;#160; &lt;p&gt;For more information:&amp;#160; &lt;a href="http://www.microsoft.com/learning/careeroffers"&gt;http://www.microsoft.com/learning/careeroffers&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890002" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="certification" scheme="http://blogs.msdn.com/ekraus/archive/tags/certification/default.aspx" /></entry><entry><title>Searching SharePoint with Windows 7 Search Connectors</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/08/25/searching-sharepoint-with-windows-7-search-connectors.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/08/25/searching-sharepoint-with-windows-7-search-connectors.aspx</id><published>2009-08-26T01:27:45Z</published><updated>2009-08-26T01:27:45Z</updated><content type="html">&lt;p&gt;Windows 7 allows you to create custom search connectors to various OpenSearch standard search engines, e.g. Bing and you guessed it:&amp;#160; SharePoint!&amp;#160; Creating a search connector is super easy!    &lt;br /&gt;    &lt;br /&gt;1.&amp;#160; Open Notepad and copy in the XML below     &lt;br /&gt;    &lt;br /&gt;2.&amp;#160; Replace the areas in red with your SharePoint Search Center information.&amp;#160; Be sure to only replace just the part of the URL that gets to your Search Center:&amp;#160; e.g.&amp;#160; http://sharepoint.company.com/SearchCenter&amp;#160;&amp;#160; You can also change the scope:&amp;#160; e.g.&amp;#160; &amp;amp;amp;s=Intranet&amp;#160; or&amp;#160; &amp;amp;amp;s=All%20Sites&amp;#160; or even&amp;#160; &amp;amp;amp;s=People     &lt;br /&gt;    &lt;br /&gt;3.&amp;#160; Save the file to your Desktop as:&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;SharePointSite.osdx&lt;/strong&gt;     &lt;br /&gt;    &lt;br /&gt;4.&amp;#160; Double click the file to install the Search Connector.&amp;#160; (it will install to your “Searches” directory&amp;#160; e.g.&amp;#160;&amp;#160; c:\Users\&amp;lt;username&amp;gt;\Searches&lt;/p&gt;  &lt;p&gt;Optional:&amp;#160; you can add a shortcut the favorites area on any Windows Explorer window by dragging the installed Search Connector there.    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;------------------------------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;    &lt;br /&gt;&amp;lt;OpenSearchDescription xmlns=&amp;quot;&lt;a href="http://a9.com/-/spec/opensearch/1.1/&amp;quot;"&gt;http://a9.com/-/spec/opensearch/1.1/&amp;quot;&lt;/a&gt; xmlns:ms-ose=&amp;quot;&lt;a href="http://schemas.microsoft.com/opensearchext/2009/&amp;quot;"&gt;http://schemas.microsoft.com/opensearchext/2009/&amp;quot;&lt;/a&gt;&amp;gt;     &lt;br /&gt;&amp;lt;ShortName&amp;gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;SharePoint Search&lt;/font&gt;&lt;/strong&gt;&amp;lt;/ShortName&amp;gt;     &lt;br /&gt;&amp;lt;Description&amp;gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;Search the SharePoint site.&amp;lt;/&lt;/font&gt;&lt;/strong&gt;Description&amp;gt;     &lt;br /&gt;&amp;lt;Url type=&amp;quot;application/rss+xml&amp;quot; template=&amp;quot;&lt;font color="#ff0000"&gt;&lt;strong&gt;http://sharepoint.company.com/searchcenter/_layouts/srchrss.aspx?k={searchTerms}&amp;amp;amp;s=All%20Sites&lt;/strong&gt;&lt;/font&gt;&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;lt;Url type=&amp;quot;text/html&amp;quot; template=&amp;quot;&lt;strong&gt;&lt;font color="#ff0000"&gt;http://sharepoint.company.com/searchcenter/Pages/Results.aspx?k={searchTerms}&amp;amp;amp;s=All%20Sites&lt;/font&gt;&lt;/strong&gt;&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;lt;ms-ose:ResultsProcessing format=&amp;quot;application/rss+xml&amp;quot;&amp;gt;     &lt;br /&gt;&amp;lt;ms-ose:LinkIsFilePath&amp;gt;-1&amp;lt;/ms-ose:LinkIsFilePath&amp;gt;     &lt;br /&gt;&amp;lt;/ms-ose:ResultsProcessing&amp;gt;     &lt;br /&gt;&amp;lt;/OpenSearchDescription&amp;gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9884249" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author></entry><entry><title>Packing up My Documents: A PowerShell Story</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/ekraus/archive/2009/06/12/packing-up-my-documents-a-powershell-story.aspx" /><id>http://blogs.msdn.com/ekraus/archive/2009/06/12/packing-up-my-documents-a-powershell-story.aspx</id><published>2009-06-13T00:31:25Z</published><updated>2009-06-13T00:31:25Z</updated><content type="html">&lt;p&gt;I am frequently asked by colleagues and customers for a dump of all of my SharePoint content (presentations, white papers, etc.)&amp;#160; While I continue to add files like these to my hard drive in various different locations, it has started to take me a while to aggregate them all forward.&amp;#160; It dawned on me that this need not be a half an hour exercise of locating documents.   &lt;br /&gt;    &lt;br /&gt;Bing!&amp;#160; PowerShell    &lt;br /&gt;    &lt;br /&gt;Thanks to another colleagues blog:&amp;#160; &lt;a href="http://blogs.msdn.com/daiken/archive/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget.aspx"&gt;http://blogs.msdn.com/daiken/archive/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget.aspx&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;I created a few functions and added them to my PowerShell module that loads with my profile.&amp;#160; Now it’s as simple as:    &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;font size="3" face="Courier New"&gt;Get-ChildItem -path c: -filter *sharepoint* -recurse | create-zip &amp;quot;c:\sharepoint.zip&amp;quot;&lt;/font&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;#Special Thanks to:&amp;#160; &lt;br /&gt;# &lt;a href="http://blogs.msdn.com/daiken/archive/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget.aspx"&gt;http://blogs.msdn.com/daiken/archive/2007/02/12/compress-files-with-windows-powershell-then-package-a-windows-vista-sidebar-gadget.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;# Create a new zip file from pipeline   &lt;br /&gt;function Create-Zip()    &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; param    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [string]$zipFile    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; );    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; New-Zip -zipfileName $zipFile    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $zip = Get-Zip -zipfileName $zipFile    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; #loop through files in pipeline    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; foreach($file in $input)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #add file to zip and sleep 1/2 second    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $zip.CopyHere($file.FullName)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Start-sleep -milliseconds 500    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;} &lt;/p&gt;  &lt;p&gt;#create a new zip file   &lt;br /&gt;function New-Zip    &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; param([string]$zipfilename)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; set-content $zipfilename (&amp;quot;PK&amp;quot; + [char]5 + [char]6 + (&amp;quot;$([char]0)&amp;quot; * 18))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; (dir $zipfilename).IsReadOnly = $false    &lt;br /&gt;} &lt;/p&gt;  &lt;p&gt;#get the zip file   &lt;br /&gt;function Get-Zip    &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; param([string]$zipfilename)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if(test-path($zipfilename))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $shellApplication = new-object -com shell.application    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $zipFullFilename = (get-childitem $zipfilename).FullName    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $shellApplication.NameSpace($zipFullFilename)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;}     &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9739436" width="1" height="1"&gt;</content><author><name>ekraus</name><uri>http://blogs.msdn.com/members/ekraus.aspx</uri></author><category term="PowerShell" scheme="http://blogs.msdn.com/ekraus/archive/tags/PowerShell/default.aspx" /></entry></feed>