Tuesday, November 3, 2009

SharePoint Development – VM Alternative

Who can afford to keep upgrading their hardware?

For many years now I have been an avid user of Virtual Machines with VMware workstation in particular. The Snapshot facilities VMware provides has been invaluable in being able to protect my installations when performing potentially damaging actions to my system such as installing new software or running custom applications during development.

Like many developers, performance has always been an issue with this, particularly when you are using a laptop PC with slower drives and limited RAM.

Whilst it would be great to be able to invest in the latest and greatest hardware with Solid State Drives and lots of RAM, this is not necessarily feasible for all of us.

So the question is, how do I get the most out of my current laptop without spending lots of money.

My friend and colleague David Marsh showed me what he is doing to solve this problem and it made a lot of sense to me. However, it took me a little while to work out how to get it all working, so I thought I would share my experience to perhaps save others some time and pain.

Introducing Imagex

Microsoft have a utility called Imagex which ships as a part of The Windows® Automated Installation Kit (AIK) for Windows® 7.

Imagex allows us to CAPTURE a partition saving it to a WIM file. It is a file based capture which means that it provides flexibility to be able to APPLY the image without the target partition having to be physically the same size.

So the idea here is to use imagex to provide a ‘snapshot’ like capability. I can at any time CAPTURE my dev server partition to an external drive and if I need to go back, I can just format the partition and re-APPLY the image.

Now the instructions for this can be a bit misleading in this scenario. I trawled through documentation and downloaded the WAIK toolkit. There were numerous references to booting from a WPE CD and running SYSPREP all of which I tried. But this just got me into trouble, and for a while I gave up and went back to my virtual machine.

With the impending release of the SharePoint 2010 beta and being thoroughly fed-up with waiting for my VM, I decided to give it another go. I checked with David and discovered that you don’t need to use SYSPREP or boot from a WPE disc. All I needed was the IMAGEX.EXE and WIMSCRIPT.INI files from the WAIK toolkit. (the other 1.5GB of software in WAIK isn’t required).

Of course if you are APPLYING an image to different hardware, this might not work without the SYSPREP etc. (One other thing I did in my travels working this all out was using VMware Physical to Virtual to pull the OS into an Virtual Machine when I needed to run it on different physical hardware.)

My specific scenario

Now I have a Lenovo T60P which is a 64 bit machine with 3GB RAM and a 100GB 5400RPM hard drive.

I can’t add any more RAM as 3GB is the limit for this model.

100GB is just not enough for what I want to do, so I invested in a new 320GB 7200RPM hard drive (approx A$140). I was impressed that I could just plug it in and it just worked.

I then proceeded to install Windows 7 64-bit on it and was amazed at the difference to my previous XP installation. Sleep just worked! It was FAST! My Vodafone 3G USB connection improved dramatically. I was a happy camper.

Now, what to do with all of this disk space?

I dedicated half of my 320GB to Windows 7 and my normal workstation activities.

I then added two additional partitions of almost equal size and assigned them a drive letter.


I installed Windows Server 2008R2 64 bit onto the second partition (f:) and then had a dual boot machine working nicely. I installed the Vista video driver and got the OS roles and features installed that I want for my base image. This included the Desktop experience so that I can configure the Aero themes.

Cautionary Note

If you are working with drive partitions, make sure you have adequate backups before you start. I had a normal Windows image backup of my primary Windows 7 partition as well as normal file level backups. There is the potential for loss so try this at your own risk.


To setup the boot configuration on the machine the way I wanted, I actually ran the Windows 2008 R2 installation on the G partition. I was being lazy, and I expect there are alternative ways to get the partition into the list of bootable OSes. Once that was done, I used BCDEDIT to change the descriptions on the two Windows 2008 bootable partitions in the list.

Then I re-formatted drive G so it was blank.

Once I had the OS in a state that I was happy with, I booted back into my Windows 7 OS.

I copied imagex.exe and wimscript.ini into a folder.

Drive F was the source partition that I wanted to CAPTURE and drive G was the blank partition.

I attached the external 1TB USB drive which I am using for my backups. (Drive E)

I started a command window using ‘Run as administrator’

Change to the folder that contains the IMAGEX.EXE and WIMSCRIPT.INI file.

I issued the following command:

imagex /boot /verify /compress fast /capture f: e:\images\w2k8r2base.wim  “Windows2008R2Base”


This proceeded to create the WIM image on the external hard drive. This took about 30 minutes to create.

Once I had the image created, I wanted to test it out. I decided to APPLY the image to the blank drive G.

To do this I issued the following command:

imagex /apply e:\images\w2k8r2base.wim 1 g:\


The first time I tried this exercise, I hadn’t added the /VERIFY flag to the CAPTURE command and the APPLY failed saying that the image was corrupt. After I used the /VERIFY flag on the CAPTURE, I didn’t have that problem again.

Once the image was applied to drive G, I rebooted and selected that OS from the list of bootable OSes, and voila, it started up perfectly.

Where to now?

I am now in the process of refining my base OS installation. I have installed SQL Server 2008 with SP1 and I plan to add all of the applications that I normally use BEFORE I install Visual Studio 2010 beta 2 and SharePoint 2010 and Office 2010 beta.

I will image the baseline system with SQL so that when subsequent Beta editions of SharePoint and Office 2010 are released, I can simply format the partition and reapply the base install and install the new betas. If I am doing something to my installation that I consider risky, I’ll simply image it again before I do it so I can return to where I was in the case of a failure.

I am sure I will continue to use Virtual Machines in some circumstances, but this approach should improve my productivity and allow me to use the maximum capacity of my laptop. David has spoken very highly of his experience with this approach and I am looking forward to trying out the SharePoint 2010 beta!

Tuesday, September 29, 2009

PlanetWilson SharePoint Blog: Getting email functionality with MOSS without Exchange

I’ve blogged about using mailenable for email on my SharePOint dev environments in the past, but this post showed how to setup inbound email to SharePoint using a combination of MailEnable and the Microsoft SMTP service. It was exactly what I needed and worked like a charm.

PlanetWilson SharePoint Blog: Getting email functionality with MOSS without Exchange

Friday, September 25, 2009

Exposing Excel contents to make reporting easy in SharePoint | Agile Sharepoint development by 21apps and Andrew Woodward MVP

Nice article on extracting data from Excel for display in SharePoint.

This article will show how simple it can be to use the out of the box features of SharePoint and Office documents to provide powerful reporting on you documents. This example will look at the common scenario where a SharePoint (this will work with standard WSS) document library is used to store invoices.

Exposing Excel contents to make reporting easy in SharePoint | Agile Sharepoint development by 21apps and Andrew Woodward MVP

Mark Iwaszko's technical blog: Binding Excel 2007 values using (DIP) Server Document Properties to Sharepoint- Not Simple or Intuitive

There is an issue with binding the named ranges in a spreadsheet with the metadata on the server. Adding some VBA script can overcome this.

Sub SetServerProperties()
Dim WB As Workbook
Set WB = ThisWorkbook
For Each Prop In WB.ContentTypeProperties
If Prop.Name = "Project Lead Finance" Then
Prop.Value = Range("A1").Value
End If
Next Prop
End Sub

Mark Iwaszko's technical blog: Binding Excel 2007 values using (DIP) Server Document Properties to Sharepoint- Not Simple or Intuitive

SharePoint 2007 – LDAP User Filters for Limiting User Profile Import « SharePoint Sherpa

This is very useful

If you’ve ever tried to setup SharePoint 2007 to import user profiles via LDAP you’ll like this post.  The setup of the SSP to import profiles is a fairly simple task, but what is not that easy is applying the right LDAP user filter to import only the accounts that you desire from Active Directory.  I’d like to share with you my experience with applying user filters and some of the excellent user filter examples I have found.

SharePoint 2007 – LDAP User Filters for Limiting User Profile Import « SharePoint Sherpa

Friday, September 11, 2009

SharePoint config store - Home

I was looking for a nice way to be able to externally store configuration information for things like timer jobs. I found out about this project on codeplex from Chris O’Brien which provides for an optimised and consistent approach.

SharePoint config store - Home

Wednesday, August 19, 2009

SmartTools for SharePoint - Home

This is a nice codeplex project from Jan Tielens to deploy jQuery to the SharePoint farm for use within SharePoint.

SmartTools for SharePoint - Home

How do I get person.aspx to display in different languages?

I spent quite some time looking at person.aspx recently. Person.aspx is the page that displays the user profile when you perform a People search and click on a result. It is also known as the Public My Site page.

I want to implement the Public My Site without enabling personal sites which is controlled through the SSP configuration.


What I wanted was the ability to display the user profile in multiple languages. I installed a language pack on my farm (Spanish in my case) and then when I go to the profile property mapping, I get the label definitions for English and Spanish.

The person.aspx page resides in the My Site Host site collection which I had created in a different web application.

The mistake I made was that I expected that person.aspx was going to dynamically display the labels in the alternate language depending on the language setting of the browser.

The real answer is that person.aspx displays the labels in the language of the My Site Host site collection! It is not dynamic as you might expect in asp.Net applications.

In talking to Microsoft and reading other posts, it seemed that you could only use the language of the My Site Host which the SSP only provides for one of.

However, once I realised that it was dependant on the Site Collection language, I created a second My Site Host site collection in Spanish. If I then pass the parameters to the person.aspx in the Spanish site collection, Person.aspx displays the labels in Spanish (as well as the rest of the SharePoint UI).

So now I just have to make sure that the correct person.aspx page is displayed based on the language required by the user.

SharePoint Manager 2007 - Home

This is a fantastic utility for exploring your SharePoint farm. It even provides a write feature if you want to change something which is not available via the normal UI. (Be careful!)

SharePoint Manager 2007 - Home

Wednesday, June 10, 2009

SPSource: Reverse engineering tool for SharePoint - Home

Looks like a great alternative to Solution Generator for reverse engineering SharePoint elements into a feature/solution. Keen to give it a try.

SPSource: Reverse engineering tool for SharePoint - Home

Tuesday, June 9, 2009

Sunday, May 31, 2009

Blog - Robert Bogue [MVP]

Interesting post from Rob Bogue about using Quick Parts with SharePoint. It references Andrew Connell's WCM STSADM command extensions to extract the CAML for content types http://andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx

One of the key pieces of information in his white paper is about how to get a copy of the work document with the metadata fields embedded in order to reload the template.

“Even though we have a template, it's not quite completely connected to the content type metadata in the way we want. The document itself doesn't have the content type embedded in it yet. Because of that, it won't show the new columns we added. What we need to do is create a version of the document, reset its content type, and re-upload the template.”

Blog - Robert Bogue [MVP]

Thursday, May 14, 2009

Wednesday, March 25, 2009


I came across the SharePointPodShow yesterday and downloaded all of the podcast episodes to occupy myself while driving from Sydney to Canberra.

I’ve listened to a number of them today, and they are excellent! I loved the one with Andrew Connell.


Looking forward to listening to the rest.

Thursday, March 12, 2009

Why is Word 2007 so slow?

I have been writing a lot of documents recently and was wondering why Word 2007 was running so slowly on my machine? It would be slow to switch between documents, slow to page up and down and generally a real productivity killer. I decided to find out why and saw some posts about disabling add-ins which I tried to no avail. Then something caught my eye about printer drivers.

I had a network printer in my office as the Default printer. I changed the default to be XPS writer instead and voila! My Word 2007 is now very fast, no delay switching between documents or paging up and down. Word uses the printer driver to decide how to format the document as I understand it….

Wednesday, March 4, 2009

K2.com : K2 blackpoint Released

K2 have release their new product called blackpoint. This is a very well integrated solution with Microsoft SharePoint products and technologies (WSS 3 and MOSS).

Why might you look at K2 blackpoint over an above just the Workflow Foundation that you get with SharePoint?

  • Fast creation and deployment of workflow processes using either the K2 Web Designer (built with Silverlight!) or K2 Studio. (No Code!)
  • Amazing integration with SharePoint 2007 with numerous wizard based functions
  • Rich options for forms (InfoPath, Form Server, ASP.Net, SharePoint)
  • Great user experience for the business users (One task list for all tasks with rich functionality such as out of office, redirect, delegate, bulk actions)
  • Data driven workflow (Use SmartObjects to wrap SharePoint data which can help drive your workflow)
  • Integrated security model
  • Delegated management of processes (Process portals for process managers to manage their processes)
  • Reporting
  • Enterprise grade server for process execution

Amazing price point! (In my opinion, the time saved building, deploying and managing processes will provide very fast ROI on the cost of K2)

K2.com : K2 blackpoint Overview

Tuesday, February 24, 2009

Coderush Xpress

I heard today that Devexpress have made available a free version of CodeRush for C# developers called CodeRush Xpress. This is a plugin for Visual Studio 2008.



I was listening to DotNetRocks this morning about YSlow, a tool to help optimise the performance of web sites. I downloaded it and gave it a try. It is pretty impressive. You can work with it interactively or print a report.


Wednesday, January 28, 2009

Access to User Profiles

I have a Timer Job in a MOSS development environment. The job scans the user profiles and if an entry is different from another data source, it updates the profile. I was wondering why the profiles were not being updated. There were no exceptions or messages. Then I realised that the account that is used for the timer job did not have ‘Manage user profiles’ permissions. This meant that properties that are not public appear to have the value ‘null’.


I gave the account permissions, and voila!

Wednesday, January 21, 2009

Deleting SharePoint user profiles and Search

I have a solution which filters the imported users from AD based on an LDAP query string.

When a user is disabled and no longer matches that query, it is flagged by SharePoint as ‘missing from import’. The user profile is still indexed and then still appears in the search results.

It turns out that the “My Site Cleanup Job” which by default runs hourly, does remove the user profiles that have been flagged. Then when the incremental index update occurs, that user no longer appears in the People Search…

SharePoint Central Administration: High Availability, Load Balancing, Security & General Recommendations

An excellent article about how to deploy Central Admin.

SharePoint Central Administration: High Availability, Load Balancing, Security & General Recommendations

Tuesday, January 20, 2009