SharePoint Tenant Creation with Change Request tracking in System Center Service Manager

One of the more troublesome issues in SharePoint is creating new site collections when not logged into Central Administration. Because this task always requires someone with farm admin access it tends to not get high priority in a normal administrators daily role. Additionally, Governance teams should validate when site collections are being created and monitored correctly versus creating a sub site. By combining the ease of submitting a request in a SharePoint list and the Best Practice of tracking changes in Systems Center Service Manager with Opalis there is a smooth, expedient, tracked manor to provision site collections. By combining SharePoint and SCSM a decision can be made as to where the approval workflow reside. For this demonstration the site collection will be automatically provisioned and a Change Request will automatically be created inside Systems Center Service Manager. Then the SharePoint list item that originally kicked off the process will be updated to show the request has been completed. Finally the SCSM ticket will be closed automatically so there is a record of the change.

Requirements

· Custom SharePoint List that includes

§ Title column to store the type of request. The default value is defined as Site Collection Request.

§ Site Collection URL column to the preferred url of the site.

§ Primary Site Collection Administrator column.

§ A Request column that is a calculated field that combines the Title and the Site Collection URL to create a unique name for reporting in SharePoint and in SCSM.

§ A status column that is a dropdown with the values of New & Complete available.

§ A customized All Items view that filters out all entries that do not have a status of New.

· Systems Center Service Manager Integration Pack for Opalis

· Systems Center Service Manager configured

· Execute PowerShell Script Integration Pack

· Global Variables

Start by configuring the SharePoint Integration Pack in Opalis. Under Options Select Microsoft SharePoint (see Figure 9-50). Then add in an a configuration to point to the new SharePoint list defined in the requirements (see Figure 9-51).

clip_image002

Figure 9-50 Navigating to the Microsoft Configuration section in Opalis.

clip_image004

Figure 9-51 Defining another configuration point.

Then add a configuration for the installed System Center Service Manager. Start by selecting Options and then select System Center Service Manager (see Figure 9-52). Then create entries to connect to the System Center instance. Finally, validate the settings by clicking the Test Connection (see Figure 9-52).

clip_image006

Figure 9-52 Navigating to the System Center Service Manager Configuration section in Opalis.

clip_image008

Figure 9-53 A defined configuration to connect to System Center.

Then expand Global Settings and right-click Variables select New then select Variable (see Figure 9-54). Rather than pass the variables from SharePoint the Global Variable functionality in Opalis will be used in case these values are required again. Create two variables (see Figure 9-55).

clip_image010

Figure 9-54 Creating a new Global Variable.

clip_image012

Figure 9-55 Defined Global Variables

Then create a New Policy inside the Opalis Client and add-in the following objects

· Microsoft SharePoint

o Monitor List Item

o Update List Item

· Execute PowerShell Script

o Execute PS Script

· System Center Service Manager

o Create Change with Template

o Get Activity

o Update Activity

The end result should end up looking like Figure 9-56.

clip_image014

Figure 9-56 A Policy setup in Opalis.

Configuration of the Policy objects

Monitor List Item

Under Configuration select the name by choosing the name of the configured SharePoint list for creating a site collection request (see Figure 9-57).

clip_image016

Figure 9-57 Monitor List Item object properties.

Create Change with Template

Under the Properties section set the Connection to the name of the System Center instance defined earlier. Then for Class choose Change Request and for Template choose Standard Change Request. The Fields need to be added to so click on Select optional Fields and choose Status, Impact, Title and Actual start date. After hitting OK individually set the values in these items (see Figure 9-58).

· Status = New

· Impact = Minor

clip_image018

Figure 9-58 Create Change with Template properties.

To set the Title field by right-clicking in the Title field, select Subscribe and select Published Data (see Figure 9-59). The only available option (after connecting the two objects) is Monitor list Item. Scroll through the columns and select the Request column from SharePoint. Actual start date is defined the same way but the value is from Created.

clip_image020

Figure 9-59 Setting the Title field by subscribing to Published Data.

Execute PS Script

Under the Input Properties right-click the PS Script 01 and select Expand. There are five variables in the PowerShell script and just a simple concatenation of the variables. Finally the script creates a new site collection with the url and primary site collection administrator passed in as dynamic variables (see Figure 9-60).

· #webUrl -This is subscribed to the Global Variable SharePoint Web Application URL

· $managedPath - This is subscribed to the Global Variable SharePoint Managed Path

· $scUrl - This is subscribed to from the Monitor List Item object.

· $ownerAlias – This is subscribed to from the Monitor List Item object

· $completeUrl – This concatenates $webUrl, $managedPath, and $scUrl

clip_image022

Figure 9-60 PS Script 1 properties to create a dynamic site collection

Update List Item

The objective of the Update List Item object in this scenario is to demonstrate automated completion of the operation without the complexity of creating a SharePoint workflow. This object takes in the ID of the list item from Monitor List Item and updates the Status column to Complete (see Figure 9-61).

Open the Configuration section of this object and select the SharePoint configuration that points the Site Collection Request list. There are two properties that are setup in this object.

· ID – This is subscribed to from the Monitor List Item

· Status – This is set to the value of Complete

clip_image024

Figure 9-61 Update List Item Properties.

Get Activity

The Get Activity object needs the Connection to point to the configured Systems Center in Opalis. The Activity Class is set to Manual Activity and Source Object Guid is subscribed to from the Create Change with Template object (see Figure 9-62).

clip_image026

Figure 9-62 Get Activity properties.

Update Activity

The final object in the policy updates SCSM and changes the status of the ticket to Completed. The Properties Connection needs to be set to the configured System Center in Opalis. The Activity Class is set to Manual Activity and the Object Guid is subscribed to from Get Activity. The only field utilized is the Status field and it is set to Completed (see Figure 9-63).

clip_image028

Figure 9-63 Update Activity properties connected to the System Center connection, set to a Manual Activity and receiving the Object Guid from Get Activity.

Testing

Place the Policy in Policy Test Console and click the Run button. The Monitor List Item object will be waiting for a new SharePoint list item to be created (see Figure 9-64). After the new item is detected a ticket is created (see Figure 9-65).

clip_image030

Figure 9-64 Site Collection provisioning Policy in debug mode.

clip_image032

Figure 9-65 Site collection ticket in System Center Service Manager showing a status of completed.

No comments: