Share via


New-SCSMDCMWorkflow

New-SCSMDCMWorkflow

Creates a DCM workflow in Service Manager.

Syntax

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

Detailed Description

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

Parameters

-ComputerName<String[]>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ConfigurationBaseLine<Hashtable[]>

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

-- Baseline
-- Configuration

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

Specifies the description of the DCM workflow.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DisplayName<String>

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

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Enable<Boolean>

Indicates whether this cmdlet enables or disables the DCM workflow.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnableNotification<Boolean>

Indicates whether this cmdlet enables or disables notifications.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementPack<ManagementPack>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Notification<Hashtable[]>

Specifies the notification details of the DCM workflow.

Aliases

none

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection[]>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Template<ManagementPackObjectTemplate>

Specifies the Object template to apply to the DCM workflow.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Create a DCM workflow

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.

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

Get-SCSMDCMWorkflow

Get-SCSMManagementPack

Get-SCSMObjectTemplate

Remove-SCSMDCMWorkflow

Update-SCSMDCMWorkflow