SYNOPSIS
Add Archive Shuttle workflow policy.
SYNTAX
Add-ASWorkflowPolicy [-Core] <ConnectCore> [-WorkflowPolicyName] <string> [-Description] <string> [-ToContainerTypes] <WorkflowPolicyContainerTypeEnum[]> [[-IsSystem] <SwitchParameter>] [[-Enabled] <bool>] [[-WorkflowPolicyType] <StageType>] [<CommonParameters>]
DESCRIPTION
The Add-ASWorkflowPolicy cmdlet creates new workflow policy. Core parameter in the cmdlet is mandatory. You can specify core as a parameter, or call Connect-ASCore once and the core parameter will be automatically added from the session state.
Example:
Add-ASWorkflowPolicy -WorkflowPolicyType Stage2 -WorkflowPolicyName WFPNAME01 -Description WFPDESC -ToContainerTypes Exchange,PST -Enabled 1 |
/* Creates new stage 2 workflow policy with specified parameters and is enabled */ |
Add-ASWorkflowPolicy -WorkflowPolicyType Stage2 -WorkflowPolicyName 03TEST -Description TESTDESC03 -IsSystem -Enabled 0 |
/* Creates new system stage 2 workflow policy (system=cannot be deleted) with specified parameters and is disabled */ |
Add-ASWorkflowPolicy -WorkflowPolicyType Premigration -WorkflowPolicyName 01PreMigrationWFPolicy -Description TESTPreMigWFPolicy -Enabled 1 |
/* Creates new pre-migration workflow policy with specified parameters and enabled*/ |
NOTE: This command only creates workflow policy without steps. These must be added via a different command. |
SYNOPSIS
Set AS workflow policy.
SYNTAX
Set-ASWorkflowPolicy [-Core] <ConnectCore> [-WorkflowPolicyId] [<int>] -WorkflowPolicyName] > [-Description] [<string>] [-ToContainerTypes] [<WorkflowPolicyContainerTypeEnum[]>] >-IsEnabled] [<bool> [<CommonParameters>]
DESCRIPTION
The Set-ASWorkflowPolicy cmdlet updates existing workflow policy. Core parameter in the cmdlet is mandatory. You can specify core as a parameter, or call Connect-ASCore once and the core parameter will be automatically added from the session state.
Example:
Set-ASWorkflowPolicy -WorkflowPolicyId 1 -WorkflowPolicyName NEWNAME -Description NEWDESC -Enabled 0 -IsSystem 0 -ToContainerTypes None |
/* Properties of the specified Workflow Policy are either replaced or changed |
---|---|
Get-ASWorkflowPolicy -WokflowPolicyId 1 | Set-ASWorkflowPolicy -Enabled 0 |
/* Specified Workflow Policy is retrieved and then set to disabled */ |
SYNOPSIS
Get step of workflow policy.
SYNTAX
Get-ASWorkflowPolicyStep [-Core] <ConnectCore> [-WorkflowSequenceId] [<int>] [-WorkflowPolicyId] [<int>] [-CommandId] [<CommandEnum>] [<CommonParameters>]
DESCRIPTION
The Get-ASWorkflowPolicyStep cmdlet gets workflow policy step. Core parameter in the cmdlet is mandatory. You can specify core as a parameter, or call Connect-ASCore once and the core parameter will be automatically added from the session state.
Example:
Get-ASWorkflowPolicyStep -WorkflowPolicyId 19 Get-ASWorkflowPolicyStep -WorkflowSequenceId 277 Result: WorkflowSequenceId : 277WorkflowPolicyId : 52 Command : Office365RemoveLicense CommandId : 1112 SequenceOrder : 1 WorkflowTriggerDefinition : NoTrigger IsWaitOnAllPrevious : False RunInParallelWithPrevious : False RetryFailed : True RetryFailedAfterMinutes : 5 RetryUnresponsive : True RetryUnresponsiveAfterMinutes : 5 IsContainerGranularityOnly : False |
/* Retrieves all steps related to specified Wotkflow Policy */ /* Retrieves details of exact step based on unique WorkflowSequenceId */ |
Get-ASWorkflowPolicyStep -Command Office365RemoveLicense
Get-ASWorkflowPolicyStep -Command Office365RemoveLicense | ForEach-Object { $step = $_ $wfpolicy = Get-ASWorkflowPolicy -WorkflowPolicyId $step.WorkflowPolicyId New-Object -TypeName PSObject -Property @{ WorkflowPolicyId = $step.WorkflowPolicyId WorkflowName = $wfpolicy.WorkflowPolicyName WorkflowSequenceId = $step.WorkflowSequenceId Command = $step.Command } } | Select-Object -Property WorkflowName,WorkflowPolicyId,WorkflowSequenceId,Command |Sort-Object WorkflowName |
/* Retrieves all steps related to specified command with full details (retrieves list of all Workflow Policies where specified command is used) */ |
Get-ASWorkflowPolicy -First 2 | Get-ASWorkflowPolicyStep | Sort-Object WorkflowPolicyId,SequenceOrder | Format-Table -AutoSize |
/* Retrieves Workflow Policy steps for all Workflow Policies */ |
SYNOPSIS
Add command to workflow policy.
SYNTAX
Add-ASWorkflowPolicyStep [-Core] <ConnectCore> [-WorkflowPolicyId] <int> [-Command] <CommandEnum> -WorkflowTriggerDefinition] [<WorkflowTriggerDefinitionEnum[]>-IsWaitOnAllPrevious] [<SwitchParameter>-RunInParallelWithPrevious] [<SwitchParameter>-RetryFailed] [<SwitchParameter>-RetryFailedAfterMinutes] [<int>-RetryUnresponsive] [<SwitchParameter>-RetryUnresponsiveAfterMinutes] [<int>-IsContainerGranularityOnly] [<SwitchParameter> [<CommonParameters>]
DESCRIPTION
The Add-ASWorkflowPolicyStep cmdlet creates new workflow sequence = adds command to workflow policy. Core parameter in the cmdlet is mandatory. You can specify core as a parameter, or call Connect-ASCore once and the core parameter will be automatically added from the session state.
Example:
Add-ASWorkflowPolicyStep -WorkflowPolicyId 50 -Command CollectItemsForArchive |
/* New Workflow step is added into specified Workflow Policy (step is set to default settings) */ |
$newWfPolicy = Add-ASWorkflowPolicy -WorkflowPolicyName NewWfPolicy -Description "DescriptionDescription" -ToContainerTypes Office365 -Enabled 1
Add-ASWorkflowPolicyStep -WorkflowPolicyId $newWfPolicy.Id -Command WaitForImportFinished -WorkflowTriggerDefinition ManualSwitchOver -RetryFailed -RetryFailedAfterMinutes 5 -RetryUnresponsive -RetryUnresponsiveAfterMinutes 5 -IsWaitOnAllPrevious -RunInParallelWithPrevious -IsContainerGranularityOnly Add-ASWorkflowPolicyStep -WorkflowPolicyId $newWfPolicy.Id -Command Office365RemoveLicense -WorkflowTriggerDefinition ManualSwitchOver -RetryFailed -RetryFailedAfterMinutes 5 -RetryUnresponsive -RetryUnresponsiveAfterMinutes 5 -IsWaitOnAllPrevious -RunInParallelWithPrevious -IsContainerGranularityOnly |
/* New Workflow Policy is created, then two new Workflow Steps are are added with specified settings (order of steps is dependent on commands sequence execution; order can be changed by other command afterwards) */ |
© ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center