Inbound case emails are currently disrupted due to a Microsoft service interruption. To ensure updates are received, please update your case via My Cases, or for urgent requests call our Support Numbers. Thank you for your patience.

Archive Shuttle 11.4 - PowerShell Guide

Archive Shuttle and PowerShell Get Archive Shuttle commands Public commands table Available commands sorted to groups Available commands
Connect-ASCore Connect to core in AS.Cloud? Set-ASConfiguration Get-ASConfiguration Add-ASSettingSchedule Set-ASSettingSchedule Get-ASSettingSchedule Add-ASSettingDefinitionToSchedule Get-ASFailedItemThreshold Set-ASFailedItemThreshold Get-ASWatermark Set-ASWatermark Get-ASRetentionCategory Get-ASEVRetentionCategoryMapping Add-ASEVRetentionCategoryMapping Add-ASWorkflowPolicy Set-ASWorkflowPolicy Get-ASWorkflowPolicyStep Add-ASWorkflowPolicyStep Set-ASWorkflowPolicyStep Add-ASFilterPolicy Add-ASFilterCondition Get-ASFileNamePolicy Set-ASFileNamePolicy Add-ASFileNamePolicy? Get-ASTargetPathNamePolicy? Set-ASTargetPathNamePolicy? Add-ASTargetPathNamePolicy? Add-ASO365LeaversConfiguration Get-ASO365License Set-ASO365LeaversConfiguration Get-ASO365LeaversConfiguration Get-ASModule Set-ASModule Set-ASModuleLogLevel Get-ASModulePerformance Enable-ASModule Disable-ASModule Start-ASModule Stop-ASModule Restart-ASModule Start-ASCommand Get-ASCommandQueueStatus Set-ASCommandIntervalLastExecutedDate Get-ASScheduledTask Set-ASScheduledTask Enable-ASActiveDirectorySync Disable-ASActiveDirectorySync Get-ASADGroup Get-ASADGroupMember Get-ASADDomain Start-ASSyncADDomains Get-ASExchangeServer Get-ASExchangeDatabase Add-ASEnvironment Set-ASEnvironment Get-ASEnvironment Get-ASVaultStore Enable-ASArchiveGathering Disable-ASArchiveGathering Start-ASArchiveGathering Get-ASLicense Add-ASLink Get-ASLink Get-ASLinkHealth Get-ASLinkModule Set-ASLinkModule Remove-ASLinkDatabase Add-ASItemDatabase Set-ASStagingAreaPath Start-ASStagingAreaCleanup Get-ASProgressStatistics Add-ASPstSourcePath Remove-ASPstSourcePath Set-ASPstSourcePath Set-ASPstTargetPath Set-ASPstTemporaryPath Add-ASContainer Add-ASContainerToUser Get-ASArchive Get-ASUser Get-ASContainers Get-AdamContainer Get-ASMailbox Get-ASUserSyncStatus Set-ASContainer Start-ASSyncADUsers Start-ASO365SyncMailboxes Start-ASADSyncSingleUser Start-ASO365SyncSingleUser Add-ASContainerMapping Set-ASContainerMapping Get-ASBulkMappingWizardTemplate Get-ASMappings Get-ASPremigrationStatus Get-ASStage1Statistics Get-ASStage2Status Get-ASWorkflowPolicy Get-ASFilterPolicy? Enable-ASCollection Enable-ASMigration Disable-ASCollection Disable-ASMigration Enable-ASStage2 Start-ASRetryFailedItems Remove-ASContainerMapping Add-ASMappingConfigurationTemplate??? Set-ASMappingConfigurationTemplate??? Get-ASMappingConfigurationTemplate??? Remove-ASMappingConfigurationTemplate??? Add-ASJEUserGroup? Get-ASJEUserGroup Set-ASJEUserGroup Add-ASFolderNamePolicy Get-ASFolderNamePolicy Set-ASFolderNamePolicy? Get-ASJESenderRecipient Add-ASJEUserMapping Get-ASJEUserMapping Set-ASJEUserMapping Remove-ASJEUserMapping Add-ASJELeaverMapping Get-ASJELeaverMapping Set-ASJELeaverMapping Remove-ASJELeaverMapping Get-ASJEStage1Statistics Add-ASJEEmailAddressRule Get-ASJEEmailAddressRule Set-ASJEEmailAddressRule Remove-ASJEEmailAddressRule Add-ASJEADUserRule Get-ASJEADUserRule Remove-ASJEADUserRule Add-ASJEDistributionListRule Get-ASJEDistributionListRule Remove-ASJEDistributionListRule Set-ASJEDistributionListRule Copy-ASJEAutoCreationRules (Copy-ASJECreationRules) Get-ASMailboxQuotaStatus?? Update-ASMailboxSizeAndQuota?? Get-ASJELeaversStatus Set-ASJELeaversStatus Add-ASGroup Set-ASGroup Get-ASGroup Add-ASUserToGroup Add-ASTag Set-ASTag Get-ASTag Add-ASContainerToTag Recreate-ASMapiProfile Set-ASStage2Status Set-ASPremigrationAction Get-ASHealthStatus Get-ASModuleCredential Set-ASModuleCredential

Add-ASWorkflowPolicy

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*/

info

NOTE: This command only creates workflow policy without steps. These must be added via a different command.

Set-ASWorkflowPolicy

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 */

 

Get-ASWorkflowPolicyStep

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 */

Add-ASWorkflowPolicyStep

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) */

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating