[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Deletes an existing Response Group workflow. Workflows determine the actions that are taken when the Response Group application receives a phone call.

Syntax

Remove-CsRgsWorkflow -Identity <RgsIdentity> [-Confirm [<SwitchParameter>]] [-Tenant <Nullable>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

Rgs Identity

Unique identifier for the workflow to be removed. The Identity of a workflow consists of the location of the service where the holiday set is hosted plus a globally unique identifier (GUID). That means that a workflow will have an Identity similar to this: service:ApplicationServer:atl-cs-001.litwareinc.com/1987d3c2-4544-489d-bbe3-59f79f530a83. Because GUIDs are difficult to remember, and to work with, the Examples section demonstrates alternate ways that you can identify the workflow to be removed.

Force

Optional

Switch Parameter

Forces removal of the workflow. If this parameter is present, the workflow will be deleted without warning, even if it is currently active. If this parameter is not present then you will be asked to confirm the deletion of any active workflow.

WhatIf

Optional

Switch Parameter

Describes what would happen if you executed the command without actually executing the command.

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

Workflows are perhaps the key element in the Response Group application. Each workflow is uniquely associated with a phone number; when someone calls that number, the workflow determines how the call will be handled. For example, the call might be routed to a series of Interactive Voice Response questions that prompt the caller to enter additional information ("Press 1 for hardware support. Press 2 for software support.") Alternatively, the call might be placed in a queue and the caller placed on hold until an agent is available to answer the call. The availability of agents to answer calls is also dictated by the workflow: workflows are used to maintain both the business hours (the days of the week and the times of day when agents are available to answer calls) and the holidays (days when no agents are available to answer calls).

New workflows are created using the New-CsRgsWorkflow cmdlet. After these workflows have been created, they can later be deleted using Remove-CsRgsWorkflow. Note that, when you delete a workflow, the workflow is completely removed from the Response Group application. If you want to temporarily disable a workflow, don’t use Remove-CsRgsWorkflow; instead, use the Set-CsRgsWorkflow cmdlet to disable (and then later re-enable) the workflow.

If you try to delete an active workflow, Remove-CsRgsWorkflow will prompt you to verify that you really want to delete the workflow; Remove-CsRgsWorkflow will take no further action until you respond to the prompt. To bypass this prompt, and to silently delete an active workflow, use the –Force parameter. For example:

Get-CsRgsWorkflow –Identity "service:Redmond-ApplicationServer-1" : Remove-CsRgsWorkflow –Force

Return Types

Remove-CsRgsWorkflow deletes existing instances of the Microsoft.Rtc.Rgs.Management.WritableSettings.Workflow object.

Examples

-------------------------- Example 1 ------------------------

Copy Code
Get-CsRgsWorkflow -Identity Service:ApplicationServer:atl-cs-001.litwareinc.com | Remove-CsRgsWorkflow

Example 1 removes all the Response Group workflows from the service ApplicationServer:atl-cs-001.litwareinc.com. To do this, the command first calls Get-CsRgsWorkflow to return a collection of all the workflows found on ApplicationServer:atl-cs-001.litwareinc.com. That collection is then piped to Remove-CsRgsWorkflow, which deletes workflow in the collection.

-------------------------- Example 2 ------------------------

Copy Code
Get-CsRgsWorkflow service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Help Desk Workflow" | Remove-CsRgsWorkflow

The command shown in Example 2 deletes a single Response Group workflow: the workflow named "Help Desk Workflow" located on the service ApplicationServer:atl-cs-001.litwareinc.com. To carry out this task, Get-CsRgsWorkflow is first used to return the workflow named Help Desk Workflow (-name "Help Desk Workflow") from the service ApplicationServer:atl-cs-001.litwareinc.com. That workflow is then piped to, and deleted by, Remove-CsRgsWorkflow.

-------------------------- Example 3 ------------------------

Copy Code
Get-CsRgsWorkflow service:ApplicationServer:atl-cs-001.litwareinc.com | Where-Object {$_.Language -eq "1033"} | Remove-CsRgsWorkflow

The preceding command deletes all the English language workflows from the service ApplicationServer:atl-cs-001.litwareinc.com. To do this, Get-CsRgsWorkflow is first used to retrieve all workflows found on ApplicationServer:atl-cs-001.litwareinc.com. This collection is then piped to the Where-Object cmdlet, which selects only those workflows where the language is equal to (-eq) US English (1033). This filtered collection is then piped to the Remove-CsRgsWorkflow cmdlet, which deletes each item in the filtered collection.

-------------------------- Example 4 ------------------------

Copy Code
Get-CsRgsWorkflow service:Redmond-ApplicationServer-1 | Where-Object {$_.CustomMusicOnHold -ne $Null} | Remove-CsRgsWorkflow

The command shown in Example 4 deletes all the Response Group workflows from the service ApplicationServer:atl-cs-001.litwareinc.com that have a value of some kind for the CustomMusicOnHold property. In order to accomplish this, the command first uses Get-CsRgsWorkflow to return a collection of all the workflows found on ApplicationServer:atl-cs-001.litwareinc.com. That collection is then piped to the Where-Object cmdlet, which selects only those workflows where the CustomMusicOnHold property is not equal to (-ne) a null value ($Null). (If the property is not equal to a null value that means that custom music has been defined for this workflow.) The filtered collection is then piped to Remove-CsRgsWorkflow, which removes each item in the collection.