Export (0) Print
Expand All

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

Updated: November 1, 2013

Applies To: System Center 2012 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 SP1 - 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.

Cmdlets in Authoring Tool Workflows

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=2.0.0.0, 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>  
<dependentAssembly>
          
<assemblyIdentity name="Microsoft.EnterpriseManagement.Modules.PowerShell" publicKeyToken="31bf3856ad364e35" />
        
<bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />
     
</dependentAssembly>
       <publisherPolicy apply="yes" />      <probing privatePath="" />    </assemblyBinding>    <gcConcurrent enabled="true" />  </runtime></configuration>

In This Section

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.

-----
For additional resources, see Information and Support for System Center 2012.

Tip: Use this query to find online documentation in the TechNet Library for System Center 2012. For instructions and examples, see Search the System Center 2012 Documentation Library.
-----
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft