Administration, SharePoint

Document Property Promotion and Demotion Overview and Considerations

Overview

Document Property Promotion and Demotion is a Feature in versions of SharePoint designed to synchronize specific metadata across documents and its parent List columns and/or fields.

Property promotion refers to the process of extracting values from properties of a document and writing those values to corresponding columns on the list or document library where the document is stored.

Property demotion is the same process in reverse. Values are read from list columns and written to document properties.

Document Parser

SharePoint works together with a document parser to provide automation of the process of promoting and demoting properties so if the value of a one or more document properties changes, those changes are automatically synchronized to the parent List object or conversely when the values of the parent List columns or fields in a list item change, those changes are synchronized to the subordinate document associated with the item.

Document Parsers represent a significant advantage to managing metadata associated with one or more documents stored in a SharePoint List or Library, by providing a programmatic approach to managing the metadata associated with a document removing the need to manually synchronize important document characteristics across a document and its parent container.  By default SharePoint Server 2013 provides document parsers (pluggable) for the following types:

docx      SharePoint.SPDocumentParser.OfficeParser

docm      SharePoint.SPDocumentParser.OfficeParser

dotx      SharePoint.SPDocumentParser.OfficeParser

dotm      SharePoint.SPDocumentParser.OfficeParser

pptx      SharePoint.SPDocumentParser.OfficeParser

pptm      SharePoint.SPDocumentParser.OfficeParser

potm      SharePoint.SPDocumentParser.OfficeParser

potx      SharePoint.SPDocumentParser.OfficeParser

ppsx      SharePoint.SPDocumentParser.OfficeParser

ppsm      SharePoint.SPDocumentParser.OfficeParser

xlsx      SharePoint.SPDocumentParser.OfficeParser

xlsb      SharePoint.SPDocumentParser.OfficeParser

xlsm      SharePoint.SPDocumentParser.OfficeParser

xltx      SharePoint.SPDocumentParser.OfficeParser

xltm      SharePoint.SPDocumentParser.OfficeParser

gif       SharePoint.SPDocumentParser.ImageParser

jpeg      SharePoint.SPDocumentParser.ImageParser

jpg       SharePoint.SPDocumentParser.ImageParser

jpe       SharePoint.SPDocumentParser.ImageParser

jfif      SharePoint.SPDocumentParser.ImageParser

bmp       SharePoint.SPDocumentParser.ImageParser

dib       SharePoint.SPDocumentParser.ImageParser

png       SharePoint.SPDocumentParser.ImageParser

tif       SharePoint.SPDocumentParser.ImageParser

tiff      SharePoint.SPDocumentParser.ImageParser

ico       SharePoint.SPDocumentParser.ImageParser

wdp       SharePoint.SPDocumentParser.ImageParser

hdp       SharePoint.SPDocumentParser.ImageParser

In addition to the parsers provided out of the box, SharePoint Server 2013 also provides an extensible document parsing infrastructure that allows developers to install custom parsers for types not included out of the box to enable the process of property promotion and demotion for those types.

Architecture

Flow

Document Promotion and Demotion is applied when the following conditions are met:

  • A document is uploaded to a SharePoint Document Library
  • List item fields associated with a document are modified
  • SPFile object properties are programmatically modified
  • A document is downloaded after the list item schema is modified (first run experience only)

Picture1

 

In each scenario SharePoint will attempt to determine whether or not a parser is associated with the document type and in the event a parser is associated with the document type, SharePoint invokes the parser and sends the parser the document and property bag object.  If a promotion scenario, the document parser will fill the property bag with the values that need to be synchronized with the parent list or in a demotion scenario, extracts values from the property bag that need to be written to the document.

Content Types

Referencing the illustration above, when using the document parser interface, document parsers can access the Content Type assigned to a document and subsequently store the content type in the document in addition to updating the Content Type definition stored in the document to match the version of the definition used by a List or Document Library.

Picture1

Validating Input / Output

For content supportive of Document Parsing an XML namespace designation is added to the document metadata, in some cases, the document itself.

Example 1

Create a new HTML type document “PropValidation.html”.

Copy into the document the following HTML:

<html>
    <head>
</head>
        <body>
            <span>Hello World</span>
        </body>
    </head>
</html>

Save as something.html

Upload to a SharePoint Document Library and open the document.

The following html will be added to the document

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
       
<!–[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:IsMyDocuments msdt:dt="string">1</mso:IsMyDocuments>
</mso:CustomDocumentProperties>
</xml><![endif]–>

</head>
        <body>
            <span>Hello World</span>
        </body>
    </head>
</html>

Notice the UUID element.  The UUID is an XML namespace designation used as part of property demotion, everyone who saves an HTML-like file to a SharePoint document Library will have the same GUID inserted into the document.

Example 2

Create a new Microsoft Word Document (Document.docx).

Edit the document properties and specify a Title property of “Parse this field”.

image

Upload the document to a Document Library.  The Title column field associated with the document will reflect the document property (promotion).

image

Edit the Title property of Document.docx in the browser.

image

Download the document, the document property will be updated to reflect the value specified in the Title column field associated with the document (demotion).

image

 

Special Content Type Considerations

In some cases a document Content Type may not be associated with the Document Library where the document is uploaded (I.e. a user creates a document from a Document Template containing a Content Type or moved the document to a different Document Library.  In these scenarios, unlike the flow depicted in the image above, SharePoint will:

  • Invoke the Document Parser to demote the out of the box default List Content Type for the Document Library into the document if the document contains a property for a Content Type, but the document property is empty.  SharePoint will then promote the document properties to match columns in the out of the box List Content Type.
  • Leaves the document Content Type unchanged if the Document Library allows any Content Type and the document is assigned a Content Type not associated with the Document Library.  SharePoint will not promote the document Content Type, but will promote any document properties that match the Document Library columns.

NOTE

If a List is set to allow any Content Type, documents of any Content Type can be uploaded and their Content Types will not be overwritten which subsequently enables movement of documents between Libraries without the documents losing their metadata.

  • Invokes the Document Parser to demote the out of the box List Content Type for the Document Library into the document if the document is assigned a Content Type that is not associated with the Document Library and the Document Library does not allow any Content Types (see Note above).  SharePoint then promotes the document properties that match columns in the out of the box List Content Type and stores the document.

Enumerating Pluggable Parsers

Enumeration of Document Parsers lists all of the default (pluggable) parsers shipped with SharePoint.

To enumerate pluggable parsers refer to the following code sample.

C#

namespace EnumParsers
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.SharePoint.Administration;

    public static class Program
    {
        private static void Main()
        {
            SPFarm objFarm = SPFarm.Local;
            SPWebService service = objFarm.Services.GetValue<SPWebService>(string.Empty);

            Dictionary<string, SPDocumentParser> objParser = service.PluggableParsers;
            Dictionary<string, SPDocumentParser>.KeyCollection keys = objParser.Keys;

            Console.WriteLine("Extension     Parser");
            Console.WriteLine("---------     -------");
            foreach (string key in keys)
            {
                Console.WriteLine(string.Format(CultureInfo.CurrentCulture, "{0, -7}       {1}", objParser[key].FileExtension, objParser[key].ProgId));
            }
        }
    }
}

Disabling the Document Parser

The Document Parser can be enabled and/or disabled on-premises by configuring the SPWeb.ParserEnabled value to True|False.

C#

namespace ParserEnabled
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;

    class Program
    {
        static void Main(string[] args)
        {
            SPFarm oFarm = SPFarm.Local;
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://www.contoso.com"));

                foreach (SPSite site in webApp.Sites)
                {
                    foreach (SPWeb web in site.AllWebs)
                    {
                        if (web.ParserEnabled == true)
                        {
                            web.ParserEnabled = false;
                            web.Update();
                        }
                    }
                }
            });
        }
    }
}

Windows PowerShell

$web = Get-SPWeb www.contoso.com
$web.ParserEnabled = $false
$web.Update()

NOTE

Disabled Document Parsing should be carefully considered as it will also impact Features dependent on promotion and demotion.  For example, content type syndication and document information panels.

Disabling Document Parsing is effectively a one-way operation.  Disabling parsing disables the bidirectional synchronization of document properties, if disabled, and subsequently re-enabled and the properties are diverged while disabled, the original property values will be synchronized as contained within the property bag.

Similarly, Document Parsers also affect how content types are managed.  For example, when SharePoint invokes a parser to promote document properties (writes the properties to the parent List), the parser writes all document properties to an instance of the IParserPropertyBag interface and then determines which properties in the property bag match the columns on the parent List or Library.  If the property bag indicates that the document has an assigned content type, and the content type is supported by the document library, SharePoint promotes the document properties that match the columns that are included in the content type.

Associating Custom Parsers with File Types

In addition to enumeration and disabling document parsers, you can also add a document parser and associate with a specific parser.

The example below associates a custom document parser with an RTF extension.

C#

namespace AddParsers
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.SharePoint.Administration;

    public static class Program
    {
        static void Main(string[] args)
        {
            SPWebService service = SPWebService.ContentService;
            Dictionary<string, SPDocumentParser> parsers = service.PluggableParsers;

            string extension = "rtf";
            string progID = parsers["docx"].ProgId;
            SPDocumentParser customParser = new SPDocumentParser(progID, extension);

            if (parsers.ContainsKey(extension))
            {
                parsers.Remove(extension);
                service.Update();
            }

            service.PluggableParsers.Add(extension, customParser);
            service.Update();
        }
    }
}

Purpose

Document parsing in SharePoint provides a number of benefits to the management of metadata around documents,

Metadata management is a powerful capability offered in SharePoint, document parsing simplifies the scenario of maintaining consistent metadata between documents and their parent libraries and parent libraries and their subordinate documents.

In SharePoint several Features leverage Document Parser logic to include:

Link Fixup

Link Fixup is used to indicate a Web Part property that contain one or more links to a document, if the document is moved or renamed, Link Fixup corrects the absolute Url to reflect the new location as a relative Url.  See also ManagedLinkAttribute.Fixup property.

Property Panels

Document Information Panels are forms that are displayed within the client application, and which contains fields for the document metadata. Document information panels enable users to enter important metadata about a file anytime they want, without having to leave the client application.  For example, a Document Information Panel may include custom properties to associated with a document, such as declaration information, specific terms, etc.

For files stored in document libraries, the document information is actually the columns of the content type assigned to that file. The document information panel displays a field for each content type property, or column, the user can edit.

For documents stored in SharePoint, these property values are promoted back to the document library, as column values, when the user updates them in the document. Similarly, if the user updates the content type column values in the SharePoint user interface, the new values are demoted into the document itself, as document properties.

Metadata Portability

See Special Content Type Considerations above.

Conclusion

Document Parsers in SharePoint provide an abstract method for users when managing metadata (document properties) across client and server.

Standard
OneDrive for Business

OneDrive for Business Managed Deployment

Overview

OneDrive for Business is cloud storage for business similar to the personal experience provided by OneDrive. It's the place where employees can store, sync, and share their files across multiple devices with ease and security.  Built through the evolution of personal sites, OneDrive for Business provides the ability for an organization to provide their users enterprise grade data mobility across devices and screens and includes both a synchronization client for offline availability and simple upload experience and a Web UX to manage content through the rich capabilities of SharePoint.

Mobile View

OneDriveWeb

Web View

OneDriveUX

Managed Deployment Overview

Organizations can deploy the OneDrive for Business synchronization client by allowing their users to download the rich client and/or app at https://onedrive.live.com/about/en-us/download/ or optionally deploy to users using Click-To-Run technology for a managed, IT-led approach.

Scenario

Steps

Example Configuration.xml

IT Managed Internal OneDrive for Business Deployment

Step 1 Customize a Click-To-Run for Office 365 installation as documented at http://technet.microsoft.com/en-us/library/jj219422.aspx.

Step 2 Create a custom Configuration.xml configuration file (see example and refer to the article above for additional guidance).

Step 3 Download the OneDrive for Business Click-To-Run deployment source and copy to a network location accessible to the target users.

Step 4 Specific configuration options and product ID details as documented at http://technet.microsoft.com/en-us/library/jj219426.aspx.

 

Sample 

\serversharesetup.exe /download \servershareCustomConfiguration.xml.

<Add SourcePath="\servershareC2R_deploy" OfficeClientEdition="32" >

    <Product ID="GrooveRetail">

      <Language ID="en-us" />

    </Product>

  </Add>

IT Managed OneDrive for Business Silent Desktop Deployment

(SxS w/ Office 2010)

Refer to Steps 1-3 above and configure the custom Configuration.xml to specify the configuration options for deployment as documented at http://technet.microsoft.com/en-us/library/jj219426.aspx (see example for additional guidance).

 

Sample

\serversharesetup.exe /configure \servershareCustomC2RConfig.xml

  <Add SourcePath="\servershareC2R_deploy" OfficeClientEdition="32" >

    <Product ID="GrooveRetail">

      <Language ID="en-us" />

    </Product>

  </Add>

<Display Level="None" AcceptEULA="TRUE" />

Resources

OneDrive for Business [https://onedrive.live.com/about/en-us/business/]

OneDrive for Business Plans and Pricing [https://onedrive.live.com/about/en-us/plans/]

Download OneDrive for Business [https://onedrive.live.com/about/en-us/download/]

Office Deployment Tool for Click-to-Run [http://technet.microsoft.com/en-us/library/jj219422.aspx]

Reference for Click-to-Run Configuration.xml File [http://technet.microsoft.com/en-us/library/jj219426.aspx]

Standard
Hybrid, SharePoint

OneDrive for Business Redirection to Office 365 Overview

At the 2014 SharePoint Conference we announced the new OneDrive for Business SKU in addition to changes in Service Pack 1 functionality that enable IT administrators to selectively redirect their users to OneDrive for Business in Office 365 from SharePoint Server 2013.

Planning

The initial prerequisite steps to implementing OneDrive for Business redirection to Office 365 in Service Pack 1 is choosing the most effective identity management/federation options to suit your business needs.  At minimum cloud identity is required to enable redirection to OneDrive for Business in Office 365 or otherwise organizations seeking a more integrated, seamless experience should consider Directory Synchronization with Password Synchronization or ADFS / SSO for integrated authentication and authorization experiences.

Identity Management

A properly planned identity management solution is the basis for any hybrid topology and the key to the user experience.

Cloud Identity

Cloud identities provide the most rapid solution to provisioning users in Office 365 and is based on a separate discrete set of credentials established in Windows Azure Active Directory; however, no correlation exists between the cloud identity and the organizations’ identity primary identity provider (I.e. AD DS).
Cloud identity provides a rapid, easy to configure scenario for smaller organizations as businesses can quickly establish, manage, and authenticate users with no change to their existing identity management systems or practices.  In a cloud identity scenario, users are discretely managed through a Web portal and Windows Azure Active Directory in the Microsoft cloud.

Advantages

  • Requires no additional hardware or change to existing identity management infrastructure
  • Simple management and control of user identity – suitable for organizations with 0-50 users

Disadvantages

  • Identity and authentication are management completely in the cloud without affinity to an on-premises AD store
  • Discrete credentials across SharePoint 2013 and Office 365
  • Disconnected user experiences
  • Cannot be combined / used with hybrid SharePoint 2013 / Office 365 hybrid topologies

Directory Synchronization with Password Sync

Directory Synchronization enables an organization with an established on-premises Active Directory environment to leverage their existing on-premises and user and group accounts in Office 365 reducing overall operational costs providing easier user access to cloud services such as OneDrive for Business.  Directory Synchronization continously synchronizes on-premises user and group accounts with Windows Azure Active Directory.  Combining Directory Synchronization with Password Sync synchronizes user passwords in addition to user and group accounts to Windows Azure Active Directory allowing users to log into cloud services using the same credentials they use to log into their corporate network.

Advantages

  • Requires no additional hardware or change to existing identity management infrastructure
  • Eliminates the need to manually manage user and group accounts in Windows Azure Active Directory
  • Enables a integrated user authentication experience across on-premises and cloud services

Disadvantages

  • Somewhat disconnected user experience (users are required to log into cloud services)
  • If a user is in the scope of the password sync feature, the cloud account password is set to "Never Expire". This means that it is possible for a user's password to expire in the on-premises environment, but they can continue to log into cloud services using this expired password.
  • Users are authenticated against cloud services as opposed to on-premises Active Directory

Resources

Directory Synchronization Roadmap [http://technet.microsoft.com/en-us/library/hh967642.aspx]
Directory Sync with Password Sync Scenario [http://technet.microsoft.com/en-us/library/dn441214.aspx]
Identity and Authentication in Cloud (Poster) [http://www.microsoft.com/en-us/download/details.aspx?id=38193]

Active Directory Federation Services and Single Sign-On

Active Directory Federation Services (AD FS) makes it possible for local and federated users to use claims-based single sign-on (SSO) to Web sites and services including cloud services such as Office 365. Organizations can use AD FS to enable your organization to collaborate securely across Active Directory domains with other external organizations by using identity federation reducing the need for duplicate accounts, management of multiple logons, and other credential management issues that can occur when establishing cross-organizational trusts.

Advantages

  • Complete SSO experience with minimal to no credential prompts
  • Improved security over Directory Synchronizations (users are authenticated against on-premises Active Directory)
  • Required for complex hybrid scenarios

Disadvantages

  • Additional infrastructure required (FS)
  • Added operational complexity

Resources

Office 365 Single Sign-On with AD FS 2.0 Whitepaper [http://www.microsoft.com/en-us/download/details.aspx?id=28971]

Redirection

OneDrive for Business

OneDrive for Business redirection in Service Pack 1 allows IT administrators to selectively determine which users should be redirected to Office 365 for OneDrive for Business through Audiences.

Audiences are part of a User Profile service application that enables organizations to target content to users based on their job or task. Audiences can be defined by one or a combination of the following items:

  • Membership in a distribution list

  • Membership in a Windows security group

  • Location in organizational reporting structure

  • By public properties in user profiles

For example, an organization may elect to redirect a subset of their users by creating a Security Group (OneDrive Cloud Users) that establishes the basis for an Audience in the User Profile Service Application.

Sites Page

In addition to redirection of OneDrive for Business, IT administrators can additionally configure redirection of users Sites page to Office 365.  When redirection of the Sites page is configured users who are redirected to Office 365 will see followed sites and recommendations based on their Office 365 profile – these users will not see sites and recommendations based on on-premises SharePoint Server 2013.

Resources

Plan for OneDrive for Business in SharePoint Server 2013 [http://technet.microsoft.com/en-us/library/dn232145(v=office.15).aspx]
Redirect users to Office 365 with OneDrive for Business [http://technet.microsoft.com/en-us/library/dn627524(v=office.15).aspx]
How to redirect users to Office 365 with OneDrive for Business [http://technet.microsoft.com/en-us/library/dn627525(v=office.15).aspx]
Redirect users to Office 365 with OneDrive for Business: Scenario Overview [http://technet.microsoft.com/en-us/library/dn627523(v=office.15).aspx]
Overview of OneDrive for Business in SharePoint Server 2013 [http://technet.microsoft.com/en-us/library/dn167720(v=office.15).aspx]

Discovery

In addition to configuring user redirection, IT administrators should also consider the implications of content discovery across SharePoint Server 2013 on-premises and Office 365.

A SharePoint 2013 / Office 365 hybrid topology supports one of three possible hybrid search topologies 1) one-way inbound, 2) one-way outbound, and 3) two-way.  Each search topology requires careful consideration and planning and they provide unique user experiences that should be evaluated against user needs and use case scenarios.

Outbound Topology

A one-way outbound hybrid authentication topology enables hybrid service integration in a single direction. In a one-way outbound hybrid topology SharePoint Server 2013 on-premises consumes content and resources from Office 365. For example, search can be configured to allow federated users to see both local and remote search results in a SharePoint Server 2013 search portal.  An outbound search topology is implemented where SharePoint Online results should appear in a separate result block in SharePoint Server 2013 on-premises.  Outbound topologies are the most effective for use with OneDrive for Business redirection as they require minimal configuration and infrastructure requirements.

Resources

Plan a one-way outbound hybrid topology [http://technet.microsoft.com/en-us/library/dn607307(v=office.15).aspx]

Inbound Topology

A one-way inbound hybrid authentication topology enables hybrid service integration in a single direction. In a one-way inbound hybrid topology Office 365 consumes content and resources from SharePoint Server 2013 on-premises. For example, search can be configured to allow federated users to see both local and remote search results in an Office 365 search portal.  An inbound search topology is implemented where SharePoint Server 2013 on-premises results should appear in a separate result block in SharePoint Online.  Inbound topologies, unlike outbound topologies, require additional infrastructure (reverse proxy device) and are least commonly implemented when redirecting OneDrive for Business to Office 365 as both local and remote results are available only in SharePoint Online.

Resources

Plan a one-way inbound hybrid topology [http://technet.microsoft.com/en-us/library/dn607316(v=office.15).aspx]

Bidirectional Topology

A two-way topology enables bidirectional hybrid service integration between SharePoint Server 2013 on-premises and Office 365. For example, search can be configured to allow federated users to see both local and remote search results in either SharePoint Server 2013 on-premises or SharePoint Online search portals.  Bidirectional topologies, like inbound topologies, require additional infrastructure (reverse proxy device) in addition to VPN and/or DirectAccess to support display of results across SharePoint Server 2013 on-premises and SharePoint Online.

Resources

Plan a two-way hybrid topology [http://technet.microsoft.com/en-us/library/dn607317(v=office.15).aspx]

Demo

This demo illustrates the configuration of OneDrive for Business redirection in SharePoint Server 2013 Service Pack 1 in environment configured with Directory Synchronization with Password Sync.

[View:~/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-48-65/1738.OneDrive-For-Business-Redirection-in-Service-Pack-1.mp4:0:0]

Standard
Administration, SharePoint

SQL Server 2014 and SharePoint Server 2013

3/21/2014 is the first full day of Spring, and the first full day of SQL Server 2014 RTM.  Undoubtedly the question will be asked when will SharePoint Server 2013 support SQL Server 2014.  While it remains early, SharePoint Server 2013 will support SQL Server 2014 with the April Cumulative Update.

Resources

SQL Server 2014 Home [http://www.microsoft.com/en-us/server-cloud/products/sql-server/]

What's new in SQL Server 2014 [http://msdn.microsoft.com/en-us/library/bb500435(v=sql.120).aspx]

Standard
Administration, Events

Quick Starting Demos with Windows PowerShell

Preparing virtual machines for demonstrations can be a tedious process, compounding this is when virtual machines need to be started or shut down in a specific order.  For example, starting database servers prior to starting web servers, or starting the preferred active node before the passive node.  Starting those machines; however, is only a portion of the process, in most cases you will want them to be “available” before starting a subsequent machine.  For example, having an iSCSI Target available before the consuming iSCSI initiators are available.  Windows PowerShell, is perfect to support this scenario – it’s something I use almost everyday and have shared an example (below) of how you can accomplish all of these tasks…

So what does it do?

Provides parameters to Start/Shut Down one or more virtual machines.

Checks for process elevation, escapes if the script is not run elevated.

Starts the Hyper-V Virtual Machine Management Service if not running.

Iterates through an array of virtual machines stored in a .txt file.

Starts each virtual machine in the .txt file and waits for the heartbeat status to report ‘OK’ before starting the next virtual machine in the list.  Virtual machines are started in the order they appear in the source file, waiting ensures a clean start up – particularly where a defined start order with dependencies exists.

Shuts down virtual machines in the reverse order they were started by reading the source file bottom to top.  Waits for the virtual machine heartbeat status to report ‘’ before processing the next virtual machine.

Displays a progress bar to report on the status of the operation.

Script

[CmdletBinding(ConfirmImpact="Low")]

Param(
     [Parameter(Mandatory=$True,Position=0,ValueFromPipeline=$False,HelpMessage="Operation to perform on one or more virtual machines.")][ValidateSet("Start","Stop")]
     [String]$operation,
     [Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$False,HelpMessage="Collection of virtual machines on which operation is to be performed.")][ValidateNotNullorEmpty()]
     [String]$source
)

$ErrorActionPreference = "Stop"

Process
{
     $identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
     $principal = New-Object System.Security.Principal.WindowsPrincipal($identity)
     $role = [System.Security.Principal.WindowsBuiltInRole]::Administrator
     $elevated = $principal.IsInRole($role)

     If ($operation -eq "Start")
     {
         $service = Get-Service -Name vmms

         If ($service.Status -ne "Running")
         {
             Try
             {
                 If ($elevated)
                 {
                     Start-Service $service

                     Write-Host "Starting the Hyper-V Virtual Machine Management Service."

                     Start-Sleep -s 10

                     Clear-Host
                 }
                 Else
                 {
                     Write-Host "Requires elevation."
                     break
                 }
             }
             Catch
             {
                 [System.Exception]
                 Write-Host "Could not start Virtual Machine Management Service."
                 break
             }
         }

         $exists = Test-Path "$(Get-Location)$source.txt" 

         If ($exists -eq $True)
         {
             Try
             {
                 $list = Get-Content "$(Get-Location)$source.txt"
             }
             Catch
             {
                 [System.Exception]
                 break
             }
         }
         Else
         {
             Write-Host "The file could not be found: $source.  The document name or path is not valid."
             break
         }

         For ( $count = 0; $count -lt $list.Count; $count++
         { 
             $guest = $list[$count]

             $progress = 100 / $list.Count * ($count + 1)

             Write-Progress -Activity "Starting virtual machine…" -CurrentOperation "Starting…" -Status $guest -PercentComplete $progress

             Try
             {
                 If ($elevated)
                 {
                     Start-VM -Name $guest
                 }
                 Else
                 {
                     Write-Host "Requires elevation."
                     break
                 }
             }
             Catch
             {
                 Write-Host "Could not start virtual machine(s)."
                 break
             }

             Write-Progress -Activity "Starting virtual machine…" -CurrentOperation "Waiting…" -Status $guest -PercentComplete $progress

             do {Start-Sleep -milliseconds 100
             until ((Get-VMIntegrationService $guest | ?{$_.name -eq "Heartbeat"}).PrimaryStatusDescription -eq "OK")
         }
     }

     ElseIf ($operation -eq "Stop")
     {
         $exists = Test-Path "$(Get-Location)$source.txt" 

         If ($exists -eq $True)
         {
             Try
             {
                 $list = Get-Content "$(Get-Location)$source.txt"
             }
             Catch
             {
                 [System.Exception]
                 break
             }
         }
         Else
         {
             Write-Host "The file could not be found: $source.  The document name or path is not valid."
             break
         }

         For ($count = $list.Length1; $count -ge 0 ; $count)
         { 
             $guest = $list[$count]

             $progress = 100 / $list.Count * ($count + 1)

             Write-Progress -Activity "Stopping virtual machine…" -CurrentOperation "Stopping…" -Status $guest -PercentComplete $progress
    
             Try
             {
                 Stop-VM -Name $guest
             }
             Catch
             {
                 Write-Host "Could not stop virtual machine."
                 break
             }

             Write-Progress -Activity "Stopping virtual machine…" -CurrentOperation "Waiting…" -Status $guest -PercentComplete $progress

             do {Start-Sleep -milliseconds 100
             until ((Get-VMIntegrationService $guest | ?{$_.name -eq "Heartbeat"}).PrimaryStatusDescription -ne "OK")
         }

         Start-Sleep -s 10

         If ($elevated)
         {
             Try
             {
                 Stop-Service vmms
                 Write-Host "Stopping the Hyper-V Virtual Machine Management Service…"
             }
             Catch
             {
                 [System.Exception]
                 Write-Host "Could not stop the Hyper-V Virtual Machine Management Service."
                 break
             }
         }
         Else
         {
             Write-Host "Requires elevation."
             break
         }

         Clear-Host
     }
}

Usage

Using the scripts requires 1) saving the attached script as <name>.ps1 2) creating source .txt file with virtual machines listed in the preferred start up order.  For example,

Machine1

Machine2

Machine3

3) Saving the script and source .txt file in the same location.

4) Running the script as <name>.ps1 –Operation Start –Source <name>

Standard
Administration, SharePoint

Announcing the SharePoint Diagnostic Studio

One of the most challenging aspects of maintaining a SharePoint deployment is understanding why certain events have transpired in the environment, often IT Professionals and Developers only have access to when an event occurred and are tasked with parsing Performance Counters, Event and Diagnostic logs, or executing Transact-SQL statements against the Usage database to put the what and why to the when.  These tasks are typically accomplished through an array of tools such as Excel, Log Parser, SQL Server Management Studio…read more on the SharePoint Team Blog.

Standard
SharePoint

Categorized Index of SharePoint 2010 Whitepapers

Content

Getting Started

Planning

Upgrade

Security

Governance

Deployment

Social

Business Intelligence

Web Content Management

Search

Other Technologies

Composites

Performance and Capacity Planning

Additional Resources

Getting Started

Getting Started with Enterprise Search in SharePoint 2010 Products
http://technet.microsoft.com/en-us/library/ff631149.aspx

Planning

Evaluation Guide for SharePoint Server 2010
http://technet.microsoft.com/en-us/library/cc262881.aspx

SharePoint Server 2010 Usage Best Practices
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5c562f71-3aa9-46fd-abac-7d381813f2b8

Sharepoint Server 2010 Adoption Best Practices
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=94ee6518-75f7-47be-b4c1-0d6ec1248486

SharePoint Server 2010 Enterprise Search Evaluation Guide
http://technet.microsoft.com/en-us/library/ff631150.aspx

Best Practices for using Fine-Grained Permissions
http://technet.microsoft.com/en-us/library/gg128953.aspx 

Upgrade

Using AAM Redirection as Part of the Upgrade Process
http://technet.microsoft.com/en-us/library/ee720448.aspx

Security

Using Windows PowerShell with Forefront Protection 2010 for SharePoint
http://download.microsoft.com/download/2/3/7/23759AA4-B5C6-41D7-9A61-3BC39185E079/FPSP_Powershell.docx

Monitoring Forefront Protection 2010 for SharePoint
http://download.microsoft.com/download/D/1/4/D14C19BB-1EE8-4D85-8AC2-3E319330F45C/FPSP%20Monitoring.docx

Security Scanning and Integration with Forefront Protection 2010 for SharePoint
http://download.microsoft.com/download/3/4/8/348A7016-8EEB-47F5-B5D9-368CFD8247D8/FPSP_Scanning.docx

Governance

SharePoint 2010 Governance Planning
http://technet.microsoft.com/en-us/library/ff848257.aspx

Implementing Governance in SharePoint 2010
http://technet.microsoft.com/en-us/library/ff969355.aspx

SharePoint Server 2010 Operations Framework and Checklists
http://technet.microsoft.com/en-us/library/gg277248.aspx

Deployment

Deploying Broadcast Slide Show on SharePoint Foundation 2010
http://go.microsoft.com/fwlink/?LinkID=166486

Configuring Kerberos Authentication for SharePoint 2010 Products
http://technet.microsoft.com/en-us/library/ff829837.aspx

SharePoint 2010 for Hosters
http://technet.microsoft.com/en-us/library/ff652528.aspx 

How to Protect SharePoint with DPM 2010
http://www.microsoft.com/downloads/details.aspx?FamilyID=6bd8cff3-6e9a-49c4-a35c-51824f476dc2

Social

Planning and Deploying SharePoint Server 2010 User Profiles for My Site Web Sites
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=cd93bc74-d923-4dc9-b112-715d5ddb64fd&displaylang=en

Business Intelligence

PerformancePoint Services and PowerPivot for Excel
http://technet.microsoft.com/en-us/library/ff700212.aspx

Improving the reach and manageability of Access 2010 database applications with Access Services
http://technet.microsoft.com/en-us/library/ff397963.aspx

Understanding planning solutions and scenarios
http://technet.microsoft.com/en-us/library/ff795778.aspx

Configuring Extranet Access for PerformancePoint Services 2010
http://go.microsoft.com/fwlink/?LinkId=202004

Web Content Management

End-to-end Content Deployment Walkthrough
http://technet.microsoft.com/en-us/library/cc627268.aspx

Search

Search Topology Operations in SharePoint Server 2010
http://technet.microsoft.com/en-us/library/ff696763.aspx

Other Technologies

Business Productivity at Its Best:  Microsoft Office 2010 and Microsoft SharePoint 2010 Products
http://technet.microsoft.com/en-us/library/ff384150.aspx

SQL Server 2008 R2 and SharePoint 2010 Products:  Better Together
http://technet.microsoft.com/en-us/library/cc990273.aspx

Windows Server 2008 R2 and SharePoint Server 2010:  Better Together
http://technet.microsoft.com/en-us/library/ff919563.aspx

Composites

InfoPath 2010 Enhanced Integration with SharePoint Server 2010 and Its Implications When Designing Forms for Applications
http://technet.microsoft.com/en-us/library/ff645393.aspx

Performance and Capacity Planning

Access Services
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Business Connectivity Services
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Caches Overview
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Excel Services in Microsoft SharePoint Server 2010
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

InfoPath Forms Services
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Large Lists
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Large-scale Document Repositories
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

My Sites and Social Computing
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Office Web Apps
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

PerformancePoint Services
http://technet.microsoft.com/en-us/library/ff955652.aspx

Search
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Visio Services
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Web Analytics
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Web Content Management
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Word Automation Services
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Workflow
http://www.microsoft.com/downloads/details.aspx?FamilyID=fd1eac86-ad47-4865-9378-80040d08ac55

Additional Resources

Downloadable Content for SharePoint Foundation 2010
http://technet.microsoft.com/en-us/library/cc288773.aspx

Downloadable content for SharePoint Server 2010
http://technet.microsoft.com/en-us/library/cc262788.aspx

Standard