Creating a BCS Content Source using PowerShell

You can use the following command to create a content source to crawl a Business Data Connectivity Service (BDCS).

$lobSystems = @("LOBSystemName1","LOBSystemNameInstance1") 
New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication "My Search Service Application Name" -Type Business -LOBSystemSet $lobSystems

If the LOBSystemName is not correct the content source gets created but the model you want to search is not checked.

To figure out the right values for the LOBSystemName and LOBSystemInstanceName look no further than the bdcm file in your solution. Open the .bdcm file in notepad and use the Name attributes of the LobSystem and LobSystemInstance nodes.



SharePoint Health Monitor App

Introducing the SharePoint Health Monitor App. More details coming soon once the app is published in the marketplace.

Here’s a sneak peak.

What’s even more awesome? This app was exclusively developed on the Surface RT using the Touch Cover.

Tips for working with BCS and FAST Search

When building a FAST search solution to crawl external entities through BCS it can get very frustrating if you deploy a change and it doesn’t get updated in all the right places.

After much trial and error I have come up with the following checklist to keep your sanity.

Rule #1: If you change the BCS model manually (i.e. using a text editor instead of Visual Studio) you need to change the Version attribute of the Entity node in the entity that you make the change in. If you don’t do this any update you make will not be applied. This can lead to very confusing behaviour since the change you made will get reflected at some point down the line.

Apart from that here goes the checklist

  1. Delete the BCS content source
  2. Restart the SharePoint Server Search service
  3. Using Task Manager kill off any mssdmn.exe that are running
  4. Deploy your updated solution
  5. Recreate the content source and run a full crawl.

If your working in a multi-farm scenario where the Search service is in a different farm to that of the BCS service then you need to do steps #2 & #3 in the server running the Search crawls. This is important because any assemblies that you have built for the entity are dynamically copied into that server and loaded into Server Search & mssdmn.exe.

If you don’t do steps #2 & #3 Search will end up using the older version of your assembly and not the one that you just deployed.

On Ode To My Father

Hi Dadda,

I’ve wanted to write this note to you for a very long time. To let you know how much you’ve taught and inspired me with your life. I know that I don’t have a really close relationship with you like I do with Mummy. That most of our time together is spent in awkward silence while we search for something to talk about. But I want to let you know today that you have been the cornerstone of my life.

Thank you Dadda for teaching me the true meaning of love. In your 35+ years of marriage I have never seen or heard you show any hatred to Mom.

Thank you for showing me that true love means sticking with and taking care of darling Mummy who is ill with Parkinson’s.

Thank you for teaching me how to respect women by never ever raising your hand against Mummy.

Thank you for teaching me how to forgive and forget. Many people have wronged you but you never hold a grudge against anyone. You would forgive them in a heartbeat and let bygones be bygones.

You taught me morality. About always doing the right thing and to always be honest even when it is difficult. You went from being a very successful businessman to someone who doesn’t have much for which the main reason was because of your honesty and refusal to bribe or cheat anyone.

You taught me the joy of giving and sharing what little you have with others, about going out of your way to help someone who can never repay you.

You taught me not to waste anything in life. Whether it be finances or the environment around you.

You taught me what it was to work hard. I was privileged enough to work under you. Although I hated it at that time as a teenager, I now value and cherish the work ethic that you instilled in me.

You didn’t have it easy in life. Your mother died when you were just three. I can only imagine how hard it must have been to grow up without a mother’s love.

You were a promising student in school but were robbed off your education when Grandpa had you leave school and start work in the family business. Because of this you made sure that your kids got the best education possible even when it was beyond your means. I didn’t understand then but having my own family now I realise that you sacrificed quite a lot to send us to the best school possible.

You believed in me. Thinking back, if I ever showed an interest in something you made sure that I explored it. From playing the guitar and organ (which I can’t do to this day) to karate lessons, soccer and basketball lessons.

It took a lot of courage for you to let me drop out of school and follow my dream. You gave me the freedom to go after what I was passionate for. You believed in me and supported me.

One of my most favourite childhood memories is going for a swim after Sunday school. It took you less than two months to teach me how to do it. Oh the wonderful times we had.

Thank you dad for showing me that it takes a lot of courage, strength and self-control to stand by your convictions. That it takes more man to stay away from the vices of drinking and smoking.

Thank you for loving me unconditionally to this day.

Thank you for showing me how to live a life of service to others. You now dedicate your time to helping people. From running errands for various non-profits like the Little Sisters of the Poor, to visiting those who are sick or in prison and praying with them, to writing daily devotionals and sharing the Good News.

Thank you for showing me that it’s never too late to make your dreams come true, at 53 your now reading for a Bachelors in Theology and kicking ass by coming out on top in class!

Above everything else I want to thank you for the deep, personal and meaningful relationship you have with your Saviour and friend Jesus. You paved the way for me to find the one eternal treasure in life that is worth living for.

I love you Dadda.

Disable Windows Live Contacts from being synchronized to Windows Phone

One very useful Windows Phone feature is that it automatically adds all your Windows Live contacts to your Windows Phone when you sign in. This is all fine and dandy if that’s your master contact  list but for me all of those contacts were carried over from MSN Messenger which I stopped using many years ago.

The most annoying bit is that there is no way to get rid of those contacts. As of WP 7.5 you only have two options either delete all your contacts from Windows Live or change your primary Windows Live ID (which required a hard reset).

There is a third option though and that is to filter out the Windows Live contacts from the People Hub.

To do so go to the People Hub Jailbreak iPhone 6 -> Settings -> Filter -> Uncheck Windows Live

Tada a quick and painless way to remove the Windows Live contacts and keep your address book tidy.

Windows 8 – New Folder

To create a new folder in windows explorer pre Win8 was Alt+F, N.

In Windows 8 it’s Alt+H, N

There are many new shortcuts like Alt+F,S to start PowerShell etc.. The neat advantage with the ribbon bar is that you press Alt and can see the shortcut letters displayed so you don’t need to memorise these things.

LogParser – Converting IIS logs to local date and time and filtering by date range

This is a note to myself to remember how to convert the UTC date/time to the local timezone.

logparser “SELECT TO_TIMESTAMP(date, time) AS utc-timestamp, TO_LOCALTIME(utc-timestamp) AS local-timestamp,* FROM D:\Log\SearchServiceWrapperLogs\SearchServiceWrapperLogs\u_ex1202* WHERE local-timestamp between timestamp(‘2012/02/02 00:00:00’, ‘yyyy/MM/dd hh:mm:ss’) and timestamp(‘2012/02/03 00:00:00’, ‘yyyy/MM/dd hh:mm:ss’)” -recurse:-1 -o:csv » fulllog.csv

Fixed: The target “GetCopyToOutputDirectoryContentProjectItems” does not exist in the project.

If your building a Windows Phone app and get this error then a quick fix is to download the XNA Game Studio 4.0 Refresh (40 MB) and install it.

This adds the missing target.

XNA Game Studio 4.0 Refresh

Downloading and installing this takes way less time than repairing the Windows Phone SDK (which asks for a reboot as well). Also repairing does not always solve the problem.

Configure the Belkin Play Max router for SLT ADSL Broadband

I’m on vacation back home in Sri Lanka and became the tech support guy for the in-laws. They were using an old D-Link router which supported just 802.11b and a draft version of g. In short ancient. The house has two stories and a terrace but the wifi wouldn’t even work on all the rooms on the same floor.

So I went to Unity plaza and checked out all the routers that are available. Unfortunately there’s not much in terms of choice. All of the available routers were the low end versions by D-Link, a few have a low-end Linksys router and some Belkin routers. You also get a handful of Asian brands of which the Unity Plaza sales guys tout the TP-Link as being the best brand, far superior to D-Link, Linksys etc.

I finally settled on the Belkin Play Max N300+300 which sells here for Rs. 16,500/-

I got home plugged it in but couldn’t get it to connect to the SLT ADSL. I spent a few hours trying various settings, calling SLT to verify the username/password all to no avail. I finally updated the router from v1.00.45 to v1.00.46 and viola it worked.

The connectivity is really good and I don’t have any dead spots in the house.

Here are a few screenshots of the config page for SLT’s settings.