Share via


New-SCSMDCMWorkflow

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

Syntax

Default (Default)

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.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConfigurationBaseLine

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

  • Baseline
  • Configuration

Parameter properties

Type:

System.Collections.Hashtable[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:System.Management.Automation.PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specifies the description of the DCM workflow.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Enable

Indicates whether this cmdlet enables or disables the DCM workflow.

Parameter properties

Type:System.Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnableNotification

Indicates whether this cmdlet enables or disables notifications.

Parameter properties

Type:System.Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagementPack

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

Parameter properties

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPack
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Notification

Specifies the notification details of the DCM workflow.

Parameter properties

Type:

System.Collections.Hashtable[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

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

Parameter properties

Type:

Microsoft.SystemCenter.Core.Connection.Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Template

Specifies the Object template to apply to the DCM workflow.

Parameter properties

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.