New-SCSMDCMWorkflow

Creates a new Desired Configuration Management (DCM) workflow in Service Manager.

Syntax

New-SCSMDCMWorkflow
   [-DisplayName] <String>
   [-ConfigurationBaseLine <Hashtable[]>]
   [-Description <String>]
   [-Enable <Boolean>]
   [-ManagementPack <ManagementPack>]
   [-Template <ManagementPackObjectTemplate>]
   [-EnableNotification <Boolean>]
   [-Notification <Hashtable[]>]
   [-PassThru]
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-SCSMDCMWorkflow cmdlet creates a Desired Configuration Management (DCM) workflow in Service Manager.

Examples

Example 1: Create a DCM workflow

PS C:\>$ManagementPack = Get-SCSMManagementPack -Name "*IncidentManagement.Configuration" 
PS C:\> $Template01 = Get-SCObjectTemplate -Name "AssignedToUserNotificationTemplate" 
PS C:\> $Template02 = Get-SCObjectTemplate -Name "HighPriorityIncidentTemplate" 
PS C:\> $Template03 = Get-SCObjectTemplate -Name "DefaultIncidentTemplate" 
PS C:\> New-SCSMDCMWorkflow -DisplayName "DCMWorkflow03" -Description "A DCM workflow" -Enable $False -EnableNotification $True -ManagementPack $ManagementPack -Notification @{User = "Assigned To User";Template = $Template01},@{User="Created By User";Template= $Template02} -Template $Template03 
PS C:\> Get-SCSMDCMWorkflow
DisplayName     Description           Enabled
-----------     -----------           -------
DCMWorkflow03   A DCM workflow        False

The first command gets a management pack that matches the string IncidentManagement.Configuration by using the Get-SCSMManagementPack cmdlet. The command stores that object in the $ManagementPack variable.

The next three commands get templates by using the Get-SCSMObjectTemplate cmdlet. The commands store these templates in the $Template01, $Template02, and $Template01 variables. The first two templates are used in the values of the Notification parameter. The other template is used as the value of the Template parameter.

The fourth command creates a DCM workflow that has the name DCMWorkflow03.

The final command verifies the creation by using the Get-SCSMDCMWorkflow cmdlet.

Parameters

-ComputerName

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Type:System.String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConfigurationBaseLine

Specifies the hash table that represents the baseline configuration for the DCM workflow. Valid values are:

  • Baseline
  • Configuration
Type:System.Collections.Hashtable[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Type:System.Management.Automation.PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies the description of the DCM workflow.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

Specifies the display name of the workflow object that this cmdlet creates.

Type:System.String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Enable

Indicates whether this cmdlet enables or disables the DCM workflow.

Type:System.Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableNotification

Indicates whether this cmdlet enables or disables notifications.

Type:System.Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ManagementPack

Specifies the management pack in which the DCM workflow is stored.

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPack
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Notification

Specifies the notification details of the DCM workflow.

Type:System.Collections.Hashtable[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Indicates that this cmdlet returns the DCM workflow that it creates. You can pass this object to other cmdlets.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

Specifies an object that represents the session to a Service Manager management server.

Type:Microsoft.SystemCenter.Core.Connection.Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Template

Specifies the Object template to apply to the DCM workflow.

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.