Partner Technical Services Blog

A worldwide group of consultants who focus on helping Microsoft Partners succeed throughout the business cycle.

August, 2011

  • SharePoint 2010–Returning Document ID in Search Results

    (Post courtesy Sean Earp, with research and XSLT authoring by Alaa Mostafa)

    One of my favorite features of SharePoint 2010 is the Document ID.

    As discussed in the MSDN article Developing with Document Management Features in SharePoint Server 2010 (ECM):

    A document ID is a unique identifier for a document or document set and a static URL that opens the document or document set associated with the document ID, regardless of the location of the document. Document IDs provide:

    • A way to reference items such as documents and document sets in SharePoint Server 2010 that is less fragile than using URLs. URLs break if the location of the item changes. In place of the URL, the document ID feature creates a static URL for each content item with a document ID assigned to it.

    • More flexible support for moving documents or document sets at different points in the document life cycle. For example, if you create a document on a MySite or Workspace page and then publish it on a team site, the document ID persists and travels with the document, circumventing the broken URL problem.

    • A document ID generator that assigns a unique document ID to items. You can customize the format of the IDs that the service generates. By using the document management API, you can write and use custom document ID providers.

    image

    When browsing a document library with this feature enabled, you can display the Document ID column, and you will be able to see the Document ID for a given document.  Easy enough, and useful if you need to reference this Document ID in another system.

    This works great when you can browse a document library, perhaps using the new metadata navigation and filtering capabilities of SharePoint 2010, but if your document library is holding thousands and thousands of documents, users may resort to using search to find the document they are looking for.  Unfortunately, SharePoint search does not display the document ID is the search results by default.

    image

    Fortunately, SharePoint indexes Document IDs as a managed property by default, which means that with a little magic, we can add the Document ID into the search results.

    In a nutshell, SharePoint retrieves the search results as XML, and uses XSLT to transform the XML into the pretty results you see on the search results page.  Same basic concept as HTML (which has your content) and CSS (which styles that content).  We just need to tell SharePoint to return the managed property with our Document ID, and then update the XSLT to display that managed property in the search results. 

    It is not as hard as it sounds.

    Assumptions: I assume you have enabled the Document ID feature on the site collection, all documents have been assigned Document IDs, and a full crawl has been done of the site.  I also assume you are a site collection administrator with full permissions to the site collection.

    From your Search Results page  in the site collection (wherever you have it),   click on Page –> Edit (or Site Actions –> Edit Page).  You will see a ton of zones and web parts (such as the Refinement Panel, Search Statistics, Search Box, etc.  You can customize the heck out of the search results page, and move things all over the place.

    image

    For now, however, we are just going to modify the Search Core Results web part that contains…er… the core search results.  How intuitive!

    Edit the Search Core Results web part, and expand the section that says “Display Properties”.  Uncheck the box that says “Use Location Visualization”.  I have no idea why this option is named as it is… this is really the option that lets you edit the fetched properties and XSL.

    image

    As a quick aside… although you can edit the fetched properties and XSL directly from the web page properties, the experience is horrible.  I strongly recommend using an XML editor like Visual Studio or NotePad++

    In the Fetched Properties section you will see a number of columns that look like the following.  these are the managed properties that are returned by SharePoint Search

    <Column Name="PictureHeight"/>  <Column Name="PictureWidth"/>

    Somewhere before the closing </Columns> tag, add a:

    <Column Name="spdocid"/>

    (Note: if you are using SharePoint search instead of FAST search replace all instances of “spdocid” with “DocID”)

    This will cause SharePoint to return the Document ID in the search results XML.  Now let’s modify the XSL so that we display the ID in the search results.  Click on the “XSL Editor…” and copy the XSL into your XML editor of choice (or, if you like pain, just edit the 938-line long XSL sheet in a browser that does no validation or color coding.  Your choice.)

    At the top of the XSL is a list of parameter names.  Add in the following parameter (order does not matter)

    <xsl:param name="spdocid" />

    image

    Next, search for “DisplayAuthors.  After the DisplayAuthors call template, we are going to add a new call template called “DisplayID” to… well, display the ID. The template is wrapped in a conditional to ensure that if there is NOT a document ID, that it does not attempt to display a null value. 

    Add the following: following lines:

                  <xsl:if test="string-length($hasViewInBrowser) &gt; 0">
                    
                          <xsl:call-template name="DisplayID">
                            <xsl:with-param name="spdocid" select="spdocid" />
                            <xsl:with-param name="browserlink" select="serverredirectedurl" />
                            <xsl:with-param name="currentId" select="$currentId" />
                          </xsl:call-template>
                      
                  </xsl:if>

    image

    Search for “DisplayString” and we will add a section to call our template, display the ID (along with a URL that links to the document), and we’ll put brackets around the Document ID so it stands out visually.  Add the following:

      <xsl:template name="DisplayID">
        <xsl:param name="spdocid" />
        <xsl:param name="currentId" />
        <xsl:param name="browserlink" />
        <xsl:if test="string-length($spdocid) &gt; 0">
          <xsl:text xml:space="default"> [ </xsl:text>
          <a href="{concat($browserlink, $ViewInBrowserReturnUrl)}" id="{concat($currentId,'_VBlink')}">
            <xsl:value-of select="$spdocid" />
          </a>
          <xsl:text xml:space="default"> ] </xsl:text>
        </xsl:if>
      </xsl:template>
    image

    We’re almost done!  Select all your XSL, copy it, and paste it back into your SharePoint window, hit Save –> Okay –> Check In –> Publish

    Voila!  The Document ID now shows up in the search results with a clickable link back to the source document.

    image

    Random troubleshooting tip:  If you get the message “Property doesn't exist or is used in a manner inconsistent with schema settings”, this typically means one of two things:

    1. You created a custom managed property and have not yet run a full crawl so that this property does not exist in the index (this property is mapped out of the box, so it does not apply here)
    2. You are using the wrong managed property.  FAST search uses “spdocid” while SharePoint search uses “DocId”

    image

    image

    Attachments: I have attached a copy of the XSL I used for the above post to save you time copying and pasting into the right sections.  It works for me with SharePoint search, but use on a test server first and at your own risk.

  • Office 365 Deployment - Resources and Tips

    (post courtesy Bryan Petersen)

    I’ve had the opportunity to advise a number of partners on their Office 365 deployments throughout the Office 365 Beta Program and now with the publicly available Office 365. There have been numerous questions around the deployment process, such as comparing an on-premise solution to a cloud solution, meeting specific customer requirements, deployment timelines, where to start with an Office 365 deployment, identifying helpful resources/tools, licensing questions, and the list goes on. All of these questions can be very challenging and time consuming to address.

    Office 365 is not something we can jump into—no matter how urgent the request is. We need to take a systematic approach in plotting the Office 365 deployment strategy for our customers. There are many moving parts, some of which are necessary while others are not, depending on the customer requirements. In other cases, there are some requirements that are believed to be a need, but really aren’t needed when all is said and done. It’s important to understand where each of these moving parts fits and whether it’s a real need.

    This blog post will provide you with the necessary resources, ideas, and tips to help you successfully complete an Office 365 deployment. I’m also going to organize this into a series of steps that have helped me successfully deploy Office 365.

    Step 1 – Review Service Descriptions

    Review the Office 365 Service Descriptions prior to engaging with the customer. The Service Descriptions provide a great amount of detail on the various features that are available for each one of the services. Pay special attention to the Appendix area as well. The Appendix compares the on-premises version to the online which is often times an area of importance for our customers.

    Step 2 – Review the Deployment Guide

    Review the Microsoft Office 365 Deployment Guide. It is intended to help you understand the requirements and workflows for onboarding an organization to Microsoft Office 365. The Deployment Guide is also a great resource for all other resources. Notice from the screenshot below, topics 1-5 will assist you in setting up a deployment project plan. The remaining topics, 6-16, will deliver a deeper look into key areas of the deployment.

    Note: I highly recommend downloading the Deployment Guide and having the content readily available pre, during, and post deployment.

    clip_image001

    Step 3 – Partner/Customer Service Description Walk-thru

    Walk-thru the Office 365 Service Descriptions with the customer so they understand what they are/aren’t getting if they move to the cloud. This is very important, and sometimes more important than partners to understand the capabilities that will be available in Office 365. Note the various content categories available.

    Note: After you have completed Steps 1-3 and verified that the customer is ready to move to the Cloud, proceed to Step 4 which begins the deployment actions that will be taken onsite at the customer location.

    Step 4 – Assessment and Planning Toolkit

    The Microsoft Assessment and Planning Toolkit will assist in environment discovery efforts within the customer’s organization by providing automated inventory and assessment capabilities.

    Example: Computer Discovery

    clip_image002

    Example: Office 365 Readiness Results

    clip_image003

    Note: The TechNet page provides some good information on getting started with the Toolkit along with additional training.

    Step 5 – The Deployment of Office 365

    There are a couple key resources that are going to step you through the actual action of moving to The Cloud.

    Resource 1 – Exchange Online Deployment (Only)

    One resource is specific to moving from Exchange On-Premises to Exchange Online either completely or setting up coexistence. This resource is called the Exchange Deployment Assistant. You’ll notice that the Deployment Assistant has three different options – one for the On-Premises deployment only and two others where The Cloud becomes a factor.

    clip_image005

    After making your selection, you are then faced with a set of questions that are going to help the Assistant identify the exact steps needed for your deployment as seen below.

    Example – Environment Selection

    clip_image007

    Example – Scenario Selection

    clip_image009

    And the final result is a checklist of action items you must complete in order to have a successful Exchange Online deployment.

    clip_image011

    Resource 2 – Office 365 Deployment Plan (All Services Considered)

    The second resource can be found within the Office 365 Administration Center. In the left hand pane there is an Admin Overview section and under Setup you’ll find the Custom Plan link which brings you to the built-in deployment plan available.

    Example – Navigation to Custom Plan

    clip_image012

    Example – Deployment Plan Selection – Pilot or Deploy

    clip_image014

    Example – Services Selection

    clip_image016

    Example – Mail Selection – What are you migrating from?

    clip_image017

    Example – Custom Plan

    clip_image019

    As you can see, there are a number of resources available for deploying Office 365. My intention here was to provide the resources that have helped me/partners through deployments prior. Plus, they are all good leads into other resources not called out in this blog.

    Stay tuned for more Office 365 blogs covering deeper areas of the deployment, such as migration options and walk-thru, coexistence scenarios, when to use ADFS for Single Sign-on and how to deploy, etc…

  • How to fix missing system console user information from SCCM reports

    (Post courtesy Anil Malekani)

    In recent months, I have worked on two different cases where the TopConsoleUser field was missing from SCCM Reports for some of the computers. For example, here are some predefined reports where the information was missing:

    -- Hardware 3A - Primary computer users
    -- Hardware 3B - Computers for a Specific Primary Console User
    -- Hardware 4A - Shared (multi-user) Computers
    -- Hardware 5A - Console Users on a Specific Computer

    I started my troubleshooting with one of the workstations. When I checked log files on this computer, InventoryAgent.log and AssetAdvisor.log files, I found no errors. Both of log files reported SMS_SystemConsoleUser and SMS_SystemConsoleUsage fields being inventoried.

    Also the mof file, aainst.mof had definition included for classes SMS_SystemConsoleUsage and SMS_SystemConsoleUser. This means that sms_def.mof were configured correctly as well.

    The next thing I checked was the WMI class SMS_SystemConsoleUsage, under "\\<Machine Name>\root\cimv2\sms\  , using WMI CIM Studio. I found that the TopConsoleUser Property was missing from SMS_SystemConsoleUsage class. I confirmed on my lab machine that the property was there and was being inventoried by SCCM (see the screenshot below).

    clip_image002

    I Also ran a query "select TopConsoleUser from SMS_SystemConsoleUsage" which didn't return the TopConsoleUser value. Again on my lab machine it returns all class properties along with TopConsoleUser value.

    clip_image003

    After doing some more research, I found the following article from MSDN which explains the method used to collect console usage information by the class and also says that only interactive logons are acknowledged by this class.

    SMS_SystemConsoleUsage Client WMI Class

    http://msdn.microsoft.com/en-us/library/cc146052.aspx

    This class gathers information about all users from the system security event log by using logon and logoff events. When a logon event is found, the associated logon ID is used to search for a matching logoff event. If more than one logoff event is found for a specific logon event, then the last logoff event is used to calculate the amount of time that the user was logged on. This is because it is possible to issue more than one logoff request before the system actually performs the logoff action. If a matching logoff event cannot be found, the next shutdown event or logon event is used in place of a logoff event. If none of these can be found, the latest entry in the security log is used. The resulting information is aggregated by user and ordered by total console usage.

    Note
    Only interactive logons are acknowledged by this class.

    This means that users need to practice proper logon/logoff instead of simply locking their screens and unlocking on next use. This will ensure that the user logon information is captured by WMI.

    Apart from the above, logon auditing should also be enabled to make sure that logon/logoff events are captured on every computer in the domain. Here is the location within group policy:

    Group Policy\Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Audit Policy\Audit logon events

    After enabling the appropriate setting within group policy, and informing the partner that only interactive logins are captured, the TopConsoleUser information was captured from the workstation and displayed in reports as expected.

  • Mobile Computing in Education

    (Post courtesy Anil Malekani)

    I recently had an opportunity to visit a prominent Engineering college, to meet with the faculties of Computer Science programs at various colleges in Bangalore. The talk I gave was a technical discussion on the application of mobile computing in Education.  In attendance were about 80 professors from the Computer Science departments of different colleges.

    The session started with discussion on how Mobile Computing can revolutionize the way education is delivered today. The legacy system that have been in use for quite some time are in need of an uplift. We have hundreds of devices and thousands of applications available to add mobility to information delivery mechanisms. The call of the time is to identify the right set of devices and applications based on your requirements.

    Microsoft, an active contributor to Education has a number of offerings, which can ensure that every student regardless of his financial condition can use the technology, as well as learn and develop future solutions. All we need to do is spread awareness and as an educational institution take the right step forward to embrace the technology.

    Here is how students are benefited by using Mobile Computing solutions.

    clip_image002

    Benefits to colleges/schools which are equally exciting.

    clip_image004

    Microsoft offers numerous applications to make information available anywhere, anytime and also to protect mobile devices. All of them (Except local version of Office 2010 Academic 2010)  are available on the cloud and can be accessed from anywhere.

    image

    Microsoft Live@edu

    Microsoft Live@edu offers education institutions free, hosted, co-branded communication and collaboration services for students, faculty, and alumni.

    • Provision cloud-based email.
    • Provide enterprise-class tools.
    • Enable online document sharing and storage.
    • Help improve alumni communication.

    Microsoft DreamSpark

    Microsoft DreamSpark program is aimed to give students Microsoft professional tools at no charge. It's a simple process of registration and verification of student's identity, after which they can continue downloading software they need to work with.

    Windows Intune

    Manage all student and faculty PCs with Windows Intune which is a cloud based PC management and endpoint protection solution. There is no need to invest on servers infrastructure and the management console is accessible from anywhere.

    Dynamics CRM

    Schools and universities can use Microsoft Dynamics CRM to improve efficiency and get the most from their existing resources. Using Microsoft Dynamics CRM, you can:

    • Get a 360-degree view of your school, district, or campus with tools for educators and administrators that are easy to use and manage.
    • Increase productivity and enhance collaboration.
    • Quickly develop applications for learning, education, research, faculty, and student management with the xRM framework.

    There are equally exciting set of Mobile devices to choose from. The Windows Phone 7 makes communication seamless with email, text and voice communication options. Apart from communication there are thousands of applications available in the Windows Phone 7 Marketplace like Amazon Kindle, Voice Notes, Periodic Table Pro, scientific calculators etc.

    There are more devices like Windows 7 based tablet devices, laptops and also Audience Response Systems (Mobile apps/ classroom devices) make life simpler for teachers and students.

    image

    The goal with providing devices to all students is to start implementing mobile computing solutions sooner rather than later. Much of the audience was concerned about upfront costs—but the benefits of this technology to both the schools and to the students, more than make up for the costs in increased efficiency and the reuse of digital information over a lifetime.

    Microsoft Partners in the education sector may find the following resources helpful:

    Microsoft Live@edu for Partners

    https://partner.microsoft.com/40095410

    Live@edu online readiness resources

    http://www.microsoftpartnercasts.com/product/live@edu.aspx

    More resources here

    http://www.microsoft.com/education/ww/leadership/partnerships/pil/Pages/index.aspx