Wednesday, July 17, 2013

"Minnesota Nice"

How many times have you heard it? How many times have you lived it? Minnesota nice has been a mantra that has been associated with us Minne-sotahn’s for a while. It has given us the ability to get jobs and maintain great community. Our willingness to ‘be nice’ and consider others before ourselves is something that has obviously made us a staple in North America. In my travels for work/pleasure I have heard this term in the South, the Mid West, the East and now again in the south…
                I am sitting at a Fairfield Inn in Charleston, SC. I am traveling for work on a 3 day trip for a client visit. I looked forward to the trip as my last time in this area was a memorable one. I had a flight out of MSP at 1PM on Monday afternoon. Due to engine ‘troubles’ and the heat of the cabin our flight was delayed an hour. Coincidentally, my connecting flight in Atlanta departed an hour after our original landing time. I was certain I would miss my flight and be spending the night in Atlanta. Not only would this put a wrench in my plans but my client would be unassisted and the time and effort they put in to gathering the resources needed would be wasted. This doesn't sit well with me. I landed in the B terminal of ATL, and my connecting flight was in the E terminal. If you have ever been to ATL you understand that is no small feat. I took the tram over to gate E and when the tram stopped I had 1 minute to get to my flight. I got to the gate and much to my surprise, 100’s of people were waiting. My connecting flight was delayed, hooray!  Not having eaten all day, I picked up a bag of chips and a soda and sat on the only spot available, the floor. I ate my chips and waited for my plane to be ready. Once instructed, I got up and boarded the plane ‘Zone 2’ style. I was surprised to see monitors in every seat and enjoyed an episode of Breaking Bad while I dosed of into a blissful slumber...
                I woke up about 30 minutes from Charleston (total 1hr flight) and deplaned as usual. I sped over to the rental car area and proceeded to secure my vehicle. That is when I realized my wallet was GONE. No wallet, no cash (didn't have any anyway), no debit/credit cards, no IDs, nothing! That is the most empty and lost feeling I have ever had. I was in a new place, with no money and no drivers license. But wait, my passport was in my pocket too and it was still thereJ I can’t book a rental car with a passport so I had to cancel and move on.
                I updated my co-workers of the situation. No one was with me but my one of my co-workers lives about 3 hours from here. He IMMEDIATELY called me a said “Kam, anything you need, name it and I will be there in 3 hours to bring it to you.” He said “You say the word and I will be there will $1,000 in unmarked bills [chuckle], ANYTHING you need”. I thanked him and told him I would attempt some local avenues first.  I called the hotel from the airport and asked if they would be ok with me checking in without proof of my credit card. I told them my story and they said, “No problem, I can pick you up in 20 minutes, is that ok?” Really? Sweet, I thought for sure they wouldn't let me do that. He arrived to pick me up and I told him the story about losing my wallet; He felt bad and tried to help every way that he could. He setup a special trip with the shuttle to get me to my client on time the next morning and  he let me charge some food and a  couple ‘beersh’ to my room even though the card wasn't validated. He ran to the back room to get me some plastic silverware for my ‘TV Dinner’, and he left notes about my issue for the staff that was coming aboard overnight. I woke up the next morning and the shuttle driver was waiting for me after breakfast. He said, “Are you the guy that lost your wallet?” He proceeded to take my bag and open the shuttle door. He drove me to my client’s office and dropped me off and said, “Have a great day sir!” He was a very kind, generous person. Is this Minnesota nice? I think so but it doesn’t end there.
                I didn’t have a ride back to my hotel nor did I have money to pay for a cab or public transportation. My customer offered to bring me back to my hotel no questions asked. She took time out of her night to drive me back and help me out! Such a wonderfully nice person. I get back from my client site only to find that my MoneyWire had failed because my bank is ‘too secure’. So I had to spend another day with no money and no transportation. I didn’t eat all day and was dying to just have a nice meal and call it a night. But first I had to stop over at Walmart and try to perform another wire transfer. I was there at 6:30 and they close at 9. I had difficulty with the first transfer and the gal behind the counter remembered me. She gave me a number to call and get assistance. Unfortunately, they were of little help and I had to try again. She told me to stand to the side and when I was ready she would let me jump back in front of the line right away. Is this Minnesota nice? I think so but it doesn’t end there.
The clock ticked down to 9PM when the MoneyGram office at WalMart closed. I only had a few minutes to get this right and it wasn’t looking good. It was a hurry up and wait situation and I was not going to beat the clock. Looks like another night with no money and no transportation. Nope! The gal behind the counter asked me of the issue and I told her the story. She agreed to wait until her shift was done to help me out (An extra hour past closing time). We waited…and waited, and 10PM approached. Still no word on the money. Against their policy and beyond her control, she said that she would inform her replacement at 10 of the situation and get me taken care of. Is this Minnesota nice? I think so but it doesn’t end there.
                The new shift started and the replacement came over and attempted to help. Still no go. After about 15 more minutes the transfer was ready and I was able to get my money that I needed. Is this Minnesota nice? I think so but I doesn’t end there.
                I got back to my hotel, excited, and couldn’t wait to order a pizza as I was starvingJ I called Pizza Hut. The first one said “We don’t deliver but let me give you the number for the one that does”. That number said “We don’t deliver to that area but let me give you the number for the on that does”. That store finally took my order and said I would have my ZA in 30-45 minutes. I waited, and waited. An hour and a half passed and still no food. I called them back and they were closed… I walked down the front desk (as they have been most helpful thus far) and asked if they had seen a pizza guy making any deliveries. He said, “Sorry, no I haven’t.” I told him that my pizza had not shown up and I figured it was probably forgotten or missed. He said, feel free to take some chips and a drink out of the vending ‘On the House’. I politely said “That’s ok” and he quickly picked up the phone (12:30AM) and called a friend at the local Pizza shop that still delivers. He recommended the ‘Meaty Stromboli’. I ordered it and it was here in 20 minutes. Minnesota Nice, I THINK SO!
                Thanks to my wife and my family’s relentless search for my wallet, they were able to find it in Atlanta and return it to me via overnight delivery to SC.  According to Atlanta authorities retrieving a wallet and delivering it overnight is unheard of so that fact that some honest person in Atlanta returned it reassures me, there are honest people in this world.
               A little nice goes a LONG way. I feel like I am debt’d to this city and its wonderful, generous and polite people. In a time where a good customer experience seems about as far apart as a lunar eclipse, this was an awesome custom experience in many ways, and for that I say thanks for being ‘Minnesota-Charleston-Atlanta Nice’.


[Kameron]

Tuesday, June 11, 2013

SharePoint 2013 Search Topology Creator

Have you built a new SharePoint 2013 search topology lately? If you have you will notice that is all done via PowerShell. There are also some rules around how we create a new topology and how we add and remove existing components. For anyone who is not ready to dive deep into PowerShell you can use the following walkthrough to auto-provision your Search topology.

First, lets take a look at the 6 core components that support SharePoint search:

  • Admin
  • Crawler
  • Content Processing
  • Analytics Processing
  • Query Processing
  • Index

When creating a new topology you need to create the topology either ‘brand new’ or clone from existing. Next, you add your components and/or remove existing components and finally Activate. Another thing to keep in mind is that you may have to modify your topology down the road. This script can help you do just that.

The script below is two-fold. The first part is a 2013SearchConfig.xml file that contains the configuration for your new topology. This XML configuration is below.

<SearchTopology>
    <admin>
        <servers Name="WFE1" remove="false"/>

    </admin>
    <crawler>
        <servers Name="WFE1" indexLocation="D:\SP\Searchindex" partition="0" remove="false"/>
    </crawler>
        <servers Name="WFE1" remove="false"/>
    <content>
        <servers Name="WFE1" remove="false"/>
    </content>
    <analytics>
        <servers Name="WFE1" remove="true"/>
    </analytics>
    <query>
        <servers Name="WFE1" remove="false"/>
    </query>
    <index>
        <servers Name="WFE1" remove="false"/>
    </index>
</SearchTopology>

 

Using the configuration above the new cmdlet will automagically build your topology. The features are included are:

  • Adding new components to your topology on ANY server in the Farm
  • Removing any component from any server in your topology
  • Activate the new topology

Adding a component

If we look at the config we notice that one Admin component is being added to the first front end server called WFE1. If this server does not currently host an Admin component already, the script will automatically clone the topology, add the component and activate. No intervention is required.

If the server already has a component  of the same type installed the script will prompt you to ensure you want to add a new component as shown below.

image

This helps when you are looking to scale your topology.

Removing a component

Looking at the above example configuration file we notice that we also want to remove the analytics processing component off of the WFE1 server. When the script runs it is first going to create the new topology with any NEW components. It will then remove any components that you have requested. If you have told the script to remove a component you will see the prompt below:

image

image

As you can see it returns any components in that category in a 0-Based array. You select your component to remove and continue. I have entered 0 to delete the first component in the list.

NOTE: I had to run the command again and caused the order to change so my screenshot is off due the nature in which PowerShell brings in the results. I am adding in some sort abilities to keep the experience consistent.

Wednesday, May 22, 2013

XBOX One

I know, it is off topic, but Microsoft released the new Xbox One yesterday. The overall design of the unit it very sleek and will look great in any living room. The specs of this unit are very comparable to their rival with the addition of an HDMI input. The Xbox One was designed to be a ‘connected’ console that will help reinvent the way you interact with everything in your living room. Games, TV, streaming, music, the Xbox One connects to each and allows you to control them via voice and new defined gestures.

Let’s talk about voice control for a minute. How feasible is this? I love the idea of telling my Xbox what to do but I have two kids running around the house. When am I going to be able to get a word in without the Xbox hearing all the other noise? Nice feature but I think the use will be limited. Most will rely on the new Kinect gestures as well as using the new control.

I have been building media center computers based on the Windows platform since 2006. One of the biggest hurdles is that you had to have cable. Even the best TV tuner cards could not accept a DirecTV or DISH signal. The Xbox one shows promising strides in this area but they didn’t go into detail about what the Xbox One would support. If you cannot hook up an HDTV satellite provider I would call this launch a bust. A majority of subscribers will have satellite TV and without the ability to control it with the new Xbox One, it won’t be replacing living room units anytime soon.

Economies of scale. A term that Microsoft has been using since jumping ‘all in’ to the cloud. The Xbox One leverages cloud technology to make your music, movies, games and more available from anywhere is the world. Does that mean you must have a broadband connection to use Xbox One? Probably. Microsoft would not make this kind of investment to a device that will be used offline. After all, one of their primary themes around the launch was being ‘connected’. Not only to the internet but to other devices as well. Microsoft has scaled their new Xbox Live system to over 300k servers. Surpassing the capacity of the internet in 1999. That is no small feat and shows Microsoft’s commitment to the next generation of gaming and home entertainment.

The advances in the new Kinect technology look promising as well. The ability for your console to pick up your every move seams a bit scary but it also creates virtually limitless possibilities.  Creating new virtual worlds where your character can live and interact with thousands of people around the world. Interacting with games in new ways and utilizing your console for entertainment, relaxation, exercise and learning all with voice control and hand gestures.

A topic that is not thought of often is security. Do these units have same type of anti-virus or IDP system built in? An always on device that has a high definition camera into your personal life seem to be a great target for hackers and e-peeping toms. We continue to stay connected but without the risk of exposing our lives to the world. Something eerie about that Kinect optic staring you in face all the time and not knowing who ‘may’ be on the other end.

With each release we move closer to a real life Minority Report and I am excited to get the new Xbox One! I have never been an early adopter of consoles, or a big gamer, but this will be the unit I have in my living room on day 1!

Monday, May 20, 2013

TechEd 2013

TechEd 2013 is right around the corner. I will be hopping a plane from ‘sunny’ Minneapolis to ‘Hot and Muggy’ nawlansSmile (New Orleans) I am very excited to get my session list put together and see some good SharePoint material. I will be blogging and tweeting along the way so be sure to follow me @kameronberget.

Friday, May 17, 2013

Custom User Profile data from external LOB system

This post will walk through the steps needed to integrate an existing line of business (LOB) system with SharePoint’s user profile service application.
Scenario:
We want to pull in additional social data for our user’s that displays their current Facebook and Twitter handle and web address. We will utilizing the following:
  • User Profile Service Application
      • Custom properties in the UPA
        • Twitter Handle
        • Twitter Page
        • Facebook Page
      • User Profile Sync
  • SharePoint Designer ECT (External Content Type)
  • Business Connectivity Service Application
First off, we need to create an External Content Type in SharePoint designer that we will later use in our user profile service to pull data from. As you can see below, we have a basic SQL table [SocialData] that has the properties we need to feed into the User’s profile.
image
From SharePoint Designer create a new external content type and call it whatever you would like. I have called mine EmployeeSocialData. image
Next we will add external data to this ECT. In this case we are using a direct SQL connection. However, you could chose to use a WCF service to retrieve your data. As you can see below we are utilizing a Secure Store ID to connect to our data. For this example I have mapped my farm creds this ID.
image
We need to create the Read List and Read Item operation on the table SocialData. You will notice that I did not have to change anything when configuring my List/item read operations. This is because I declared the userName column in my SQL table as the primary key. SharePoint uses that column as the identifier. If your table does not have this setup you need to manually configure which field will be your identifier.
NOTE: The identifier will be the filed that the User profile Service will use to create a relationship and return employee data. This will be shown in later steps.
image
Once we create the ECt it will show in our BDC Service App as shown below.
image
We need to setup the object permissions to allow the SP Farm account to query and pull data from the ECT. In this case I am allowing a single user. Because the SPFARM account is doing to call I give the SPFARM execute permissions. I also have to give an account the Set Permissions permission to advance this screen.
image
TIP: To test whether or not your ECT is working correctly, use designer to create a list based on the ECT. You can do this via the ribbon.
image
Now we can go to our new list and ensure that data is being returned. This will validate that everything is flowing correctly. As you can see below, we are seeing all of the SQL records in our list as expected.
image
Note: You can delete this list. It only for validation purposes. Alternatively, you create additional ECT operation to allow people to update this list as well.
Next we will create our new Sync Connection in Central Admin > Service Applications > User Profile Service Application > Synchronization Connections
Add a new BCS connection to your BCS ECT that were created earlier. As you will see below, we have created a new connection to our SQL database via BCS. We have also told SharePoint that we want the UPS to match the SharePoint UserName field to the primary key we identified in our ECT to make our 1:1 match.
image
Now we can configure our user profile service application. First we will create our custom properties.
Facebook Page
Twitter handle
Twitter page
For each property we need to create a property mapping to our BCS data connection. An example of the twitter handle field is below.
imageimage
Do this for the remaining fields
Now we need to perform a full sync. If you check the FIM client you will see that our ‘updates’ are being updated in the user profile as shown below.
image
We can check our user profile and see our new data has been synced!
image

Saturday, April 13, 2013

Content By Search and Display templates

A new feature in the ‘Content Rollup’ category of SharePoint 2013 is Content By Search. This web part give us much more power to search for and aggregate content from anywhere in our farm. I recently had a requirement to present relevant help documents from one site collection in another site collection. Additionally, they wanted the user experience to give them the ability to identify the documents by presenting the necessary metadata in the search result. This required a custom display template. Let’s walk through how we can accomplish this.
First we need to add the content by search web part to our page and configure our query:
image
image
Above query displayed no results as my crawl had not yet completed.
As you can see below we are telling the CBS web part that we want to find all items matching the content type “Help Document” in the designated site collection. This is done using the quick mode to build our query. We can switch to advanced to add any other search parameters we would like as shown below.
image
After we configure the query we click ok and move on the Display template web part settings.
image As you can see we have several options to choose from. First we define how we would like to render our results. List, list with paging or slideshow. The slideshow control is very useful when creating visual rotating banners or scrolling news articles. For this scenario we will chose list as we will only be showing 5-10 documents.

Next we have to chose an item display template. The display templates that are available are Content Web Part display templates. By default you are only given 7 display templates. These can be found in /_catalogs/masterpage/Display Template/Content Web Parts.

For this scenario, none of the OOTB display templates fulfill our needs so we have to created a new display template, similar to XSL style when using the CQWP in SP 2010. To do this we crack open SPD and navigate to the above location. Next we take the template that we want to copy and modify. We can simply copy and paste. SharePoint will then create a copy of the template and the corresponding javascript (.js) file. Give this a few seconds to complete. After the copy is complete you can verify the conversion by going to the Site Actions (Gear) > Design Manager > Edit Display Templates and find the copy of your template (It will be the same name as the one you copied). Ensure that the conversion I successful.
image
As you can see above, we copied to the Two lines template and the conversion was successful.
Now we can crack open the template and start making our changes.
For this scenario the client wanted the following layout for their items:
Title Team Category Location
     
Modified by Modified By on ModifiedDate
First we should change the title of our template Winking smile
image
Next, we need to add the additional fields to our template in the Managed Property Mapping section.
image
I needed to add 4 additional fields. I just copied an existing field and incremented the field number to keep it easy. Each field looks something like this:
&#39;Title&#39;,&#39;Line 2&#39;{Line 2}
And each field is separated with a ‘:’ As you see above we added Lines 2-6 giving us 4 additional fields to display when configuring our web part.
Ok, lets change our DIV ID and unique ID as shown below.
image
Next we need to add these fields to the corresponding JavaScript variables as well as create line IDs for each of these fields. If you scroll through the template you will see areas where each field is called out. Copy these lines and adjust them to match your new lines.
image
Next we can use HTML to build our documents layout table. Because we needed a table layout I created a table and moved the fields into each row. I did this by copying the existing Line 2 DIV and A tags and adjusting them to match my new lines. If you are simply looking to display a field you can grab the:
image
Snippet and place it wherever you would like. I have done this for my ModifiedBy and ModifiedDate fields as shown below.
Note: #_ .. _# are wrapper for JavaScript logic
image
Now we can save and publish our template. Barring any errors, this will now be an available option within our web part properties.
Note: IF you make an error SharePoint 'Gracefully fails' and actually gives you some good debug information regarding line/char numbers and reason for failure. Unlike 2010 where every CQWP blows up.
image
When we select this template we are now presented with additional fields to configure under property mappings.
image
To change these field we need to check the Change the mapping of the managed properties….. checkbox.
image
The best part is that SharePoint allows us to pick crawled properties when selecting our fields!!
Now as a sanity check I have placed a border on my table so I can validate the layout as shown below.
image
Looks good to me! I removed the border on the table and published to get my final result.
image

Monday, February 4, 2013

Need clean SharePoint filenames?

A common issue when working with SharePoint is making sure your filenames and system fields conform to the SharePoint format and no invalid characters are present. This is especially apparent when using PowerShell since PowerShell is a very ’Sharp’ tool and can add some of these files with illegal characters. To combat this I have put together a quick function that you can pass any text and it will clean it and make it “SharePointReady”.

Make-SharePointReady ($filename)
{
     $filename = [System.Text.RegularExpressions.Regex]::Replace($filename,"[~`"#%&*:<>?/\{|}.(),]","")
     return $filename
}


{Kam}