< Back

Switch-AMWorkflowItem

Sat Jan 11, 2020 3:43 am

NAME Switch-AMWorkflowItem



SYNOPSIS

Replaces items in a AutoMate Enterprise workflow





SYNTAX

Switch-AMWorkflowItem [-InputObject] <Object> [-CurrentItem] <Object> [-NewItem] <Object> [-WhatIf] [-Confirm]

[<CommonParameters>]





DESCRIPTION

Switch-AMWorkflowItem can replace items in a workflow object.





PARAMETERS

-InputObject <Object>

The object to replace items in.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-CurrentItem <Object>

The current item to replace.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NewItem <Object>

The new item to replace the current item with.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

The following AutoMate object types can be modified by this function:

Workflow





OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Replace instances of the "Copy Files" task with "Move Files" in workflow "FTP Files"



Get-AMWorkflow "FTP Files" | Switch-AMWorkflowItem -CurrentItem (Get-AMTask "Copy Files") -NewItem (Get-AMTask

"Move Files")











RELATED LINKS

https://github.com/AutomatePS/AutomatePS