Okay Readers – we have the next post ready to go!

Here is the fifth of six posts in the MVP Spotlight Series for the Automation Track


–MVP Spotlight Series–

Integration Story: How to take the Imports (SharePoint and SMA) & Import them into your Environment

by Ryan Andorfer


DFS Share Creation: Integrating at Home

This post will walk you through importing the solution built during the Automated Service Requests with Microsoft System Center 2012 R2from TechEd 2014.

This solution has two components:

  • SharePoint Site
    • Request Catalog Routing Page
    • DFSShare Creation List
      • InfoPath form with input validation
      • Simple SharePoint approval workflow
  • PowerShell Workflows
    • Designed to be run in Service Management Automation (SMA)
    • Configuration Files defining global settings expected to be present in the SMA environment

Suggestion

Read the in depth blog posts about the SharePoint solution and the SMA Solution (TOC found here).


SharePoint Setup

Assumption

You have a working SharePoint site to deploy the list to. The SharePoint site is compatible with a 2013 list template.

Download the List Template

The template is available here.


Upload the List Template

  1. Log into your SharePoint site as a site Administrator.
  2. Navigate to site Settings
    image
  3. Select List Templates
    image
  4. Upload the application template
    image
    image
    image

Deploy a new List based on the List Template

  1. Log into the SharePoint site as a Site Administrator
  2. Navigate to Site Contents
  3. Select Add an App
    image
  4. Choose “DFS Share Request”
    image
  5. Name the List DFS Share Request
    image
    Note     This is important as the automation below expects the list to be named this way. If you enter something else here make sure that you update the DFSShare-SPList variable to reflect the new name.

SMA Environment Setup

Assumption

You have configured TFS integration for SMA based on this blog post. If you have not done this you can still follow along but will have to setup the global variables and do the imports manually.

Download the solution files

The files are available here.

Inspect the files and check them into TFS

image

PS1 Files

These are the actual workflow files. They contain references to global configurations and accounts that are defined in XML files included in the export. Review and update these as needed for your environment.


XML Files

These file contain all of the settings for the scripts. The values of these should be updated to reflect your environment.

To update the value of a variable update its ‘value’ section in the xml class:

image


DFSShare.xml

This file contains settings that will be accessed by multiple workflows.

  • DFSShare-SharePointCredName
    • This should reference an account that has access to read and update the SharePoint list created above
    • Update this with the name of your credential object with this level of access
  • DFSShare-DomainCredName
    • This account should have access to create Active Directory (AD) Groups in the defined OU and setup shares on your file servers
    • Update this with the name of your credential object with this level of access
  • DFSShare-ADDomain
    • Domain name for active directory operations
    • Update this with your domain name
  • DFSShare-SharePointSite
    • The base URL to the SharePoint site containing your request list
    • Update this with your site name
  • DFSShare-SPList
    • The name of your SharePoint list
    • If you followed the SharePoint import above this shouldn’t need to be changed
  • DFSShare-SPProperty
    • The name of the property containing status on your list.
    • If you followed the SharePoint import above this shouldn’t need to be changed
  • DFSShare-DelayCycle
    • This is the time between monitor polls for all monitor workflows in this solution.
    • This shouldn’t need to be updated
  • DFSShare-DelayCheckPoint
    • This is the time between checkpoints for all monitor workflows in this solution.
    • This shouldn’t need to be updated
  • DFSShare-MonitorLifeSpan
    • This is the amount of time in minutes that a monitor workflow in this solution will run before it restarts itself
    • This shouldn’t need to be updated

Monitor-DFSShare-Approved.xml

This file contains settings and variables for the Monitor-DFSShare-Approved workflow.

  • Settings include logging choices (LogVerbose [True or False] / LogDebug [True or False] / LogProgress [True or False] as well as an area for adding tags
  • Variables
    • DFSShare-MonitorApproved-MonitorValue
      • This is the value of the list item that will trigger this workflow’s initiation
      • If you followed the SharePoint import above this shouldn’t need to be changed
    • DFSShare-MonitorApproved-NextValue
      • This is the status the list item will be placed into after the workflow completes successfully
      • If you followed the SharePoint import above this shouldn’t need to be changed
    • DFSShare-MonitorApproved-ExecutionRunbook
      • This is the name of the next workflow to initiate.
      • If you are following along with this import you do not need to modify this

New-DFSShare.xml

This file contains settings and variables for the Monitor-DFSShare-Approved workflow.

  • Settings include logging choices (LogVerbose [True or False] / LogDebug [True or False] / LogProgress [True or False] as well as an area for adding tags
  • Variables
    • DFSShare-NewDFSShare-WindowsServerList
      • This is a list of comma delimited windows files servers to be used as endpoints for creating the share
      • Modify this list with your environment’s file servers
    • DFSShare-NewDFSShare-WindowsServerRestrictedDrives
      • This is a list of comma separated drive names that shouldn’t be selected as possible drive for housing the new share
      • Modify this with your settings
    • DFSShare-NewDFSShare-GroupOU
      • This is the path to the AD OU that should contain the groups securing access to the DFS Share
      • Modify this with an OU that is appropriate for your domain

Check in to TFS

  1. Create a root folder to house this project
    image
  2. Create an environment folder based on your configuration
    • Convert to branch and create other branches if appropriate
    • See the SMA TFS Integration blog post for more information on this
  3. Add the files (all PowerShell and XML Files from the zip folder) to this folder
    image
    image
  4. Check-in the files
    image

Create the SMA PowerShell Credential Objects

In our example we have to user accounts, these names are defined in the DFSShare.xml file. Since these are accounts and contain passwords that should be encrypted we need to create them by hand in our SMA environment. The configuration file merely has a pointer to their name. To do this we just open up the Windows Azure Pack (WAP) user interface (UI) and create them with the appropriate names!

image

image

image

Note     Follow the same steps to create your DomainAccess account asset in SMA.


Start the Monitor Workflow

image

image

And Voilà!You now have a fully automated DFS share request in your SMA environment!


And now a few notes from me (Charles)…

Be sure to check out Ryan’s session from TechEd North America 2014!

DCIM-B363 Automated Service Requests with Microsoft System Center 2012 R2

In this session, see a real-world implementation of a fully automated IT service catalog developed by a Fortune 500 company for supporting self-service requests. This service catalog is based in Microsoft SharePoint and utilizes the newly released Service Management Automation (SMA) engine. During the session we look at how the solution is architected, cover integration between SMA and SharePoint, build a new service offering from the ground up, and share the best practices we have developed for doing work with SMA along the way. So what’s the best part? You get access to the solution we create, so you leave with access to a working solution to help get you started!

Speakers: Ryan Andorfer, Mike Roberts

Link on TechEd NA 2014 Channel 9 Recording: DCIM-B363 Automated Service Requests with Microsoft System Center 2012 R2

And finally - As always, for more information, tips/tricks, and example solutions for Automation within System Center, Windows Azure Pack, Windows Azure, etc., be sure to check out the other blog posts from Building Clouds in the Automation Track (and http://aka.ms/IntroToSMA), the great work over at the System Center Orchestrator Engineering Blog, and of course, Ryan’s Blog over at http://opalis.wordpress.com!

enJOY!