New-SCSMDCMWorkflow

Creates a DCM workflow in Service Manager.

Syntax

New-SCSMDCMWorkflow [-DisplayName] <String> [-ComputerName <String[]>] [-ConfigurationBaseLine <Hashtable[]>]
 [-Confirm] [-Credential <PSCredential>] [-Description <String>] [-Enable <Boolean>]
 [-EnableNotification <Boolean>] [-ManagementPack <ManagementPack>] [-Notification <Hashtable[]>] [-PassThru]
 [-SCSession <Connection[]>] [-Template <ManagementPackObjectTemplate>] [-WhatIf] [<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:String[]
Required:False
Position:Named
Default value:None
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:Hashtable[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value: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:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies the description of the DCM workflow.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

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

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

Indicates whether this cmdlet enables or disables the DCM workflow.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableNotification

Indicates whether this cmdlet enables or disables notifications.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ManagementPack

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

Type:ManagementPack
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Notification

Specifies the notification details of the DCM workflow.

Type:Hashtable[]
Required:False
Position:Named
Default value:None
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:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SCSession

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

Type:Connection[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Template

Specifies the Object template to apply to the DCM workflow.

Type:ManagementPackObjectTemplate
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value: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.