Configure Windows PowerShell to Run in System Center 2012 - Service Manager


Updated: May 13, 2016

Applies To: System Center 2012 SP1 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 - Service Manager

Before you can run commands in the Windows PowerShell command-line interface in System Center 2012 – Service Manager, you must set execution policy to RemoteSigned and import the data warehouse cmdlet module.

The Service Manager cmdlets are implemented in the following two modules:

  • System.Center.Service.Manager. This module is imported automatically every time a Service Manager Windows PowerShell session is opened.

  • Microsoft.EnterpriseManagement.Warehouse.Cmdlets. This module must be imported manually.

When you use the Service Manager SP1 version of the Authoring tool to create a workflow, then custom scripts using Windows PowerShell cmdlets called by the workflow fail. This is due to a problem in the Service Manager MonitoringHost.exe.config file.

To work around this problem, update the MonitoringHost.exe.config XML file using the following steps.

  1. Navigate to %ProgramFiles%\Microsoft System Center 2012\Service Manager\ or the location where you installed Service Manager.

  2. Edit the MonitoringHost.exe.config file and add the section in italic type from the example below in the corresponding section of your file. You must insert the section before <publisherPolicy apply="yes" />.

  3. Save your changes to the file.

  4. Restart the System Center Management service on the Service Manager management server.

<?xml version="1.0"?><configuration>  <configSections>    <section name="uri" type="System.Configuration.UriSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />  </configSections>  <uri>    <iriParsing enabled="true" />  </uri>    <runtime>    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">      <dependentAssembly>        <assemblyIdentity name="Microsoft.Mom.Modules.DataTypes" publicKeyToken="31bf3856ad364e35" />        <publisherPolicy apply="no" />        <bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />      </dependentAssembly>      <dependentAssembly>        <assemblyIdentity name="Microsoft.EnterpriseManagement.HealthService.Modules.WorkflowFoundation" publicKeyToken="31bf3856ad364e35" />        <publisherPolicy apply="no" />        <bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />      </dependentAssembly>    
<assemblyIdentity name="Microsoft.EnterpriseManagement.Modules.PowerShell" publicKeyToken="31bf3856ad364e35" />  
<bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />  
       <publisherPolicy apply="yes" />      <probing privatePath="" />    </assemblyBinding>    <gcConcurrent enabled="true" />  </runtime></configuration>  

How to Set Execution Policy
Describes how to set execution policy to RemoteSigned.

How to Import the Data Warehouse Cmdlet Module
Describes how to manually import the data warehouse Windows PowerShell cmdlets.