< Back

Add-AMWorkflowVariable

Sat Jan 11, 2020 2:28 am

NAME Add-AMWorkflowVariable



SYNOPSIS

Adds a shared variable to an AutoMate Enterprise workflow





SYNTAX

Add-AMWorkflowVariable [-InputObject] <Object> [-Name] <String> [[-InitialValue] <Object>] [[-Description]

<String>] [[-VariableType] {Variable | Array | Dataset}] [[-DataType] {Auto | Text | Number}]

[-PassValueFromParent] [-PassValueToParent] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Add-AMWorkflowVariable can add shared variables to a workflow object.





PARAMETERS

-InputObject <Object>

The object to add the variable to.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <String>

The name of the variable.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InitialValue <Object>

The initial value of the variable.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

The description of the variable.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-VariableType

The type of variable: Auto, Number or Text.



Required? false

Position? 5

Default value Variable

Accept pipeline input? false

Accept wildcard characters? false



-DataType

The data type of the variable.



Required? false

Position? 6

Default value Auto

Accept pipeline input? false

Accept wildcard characters? false



-PassValueFromParent [<SwitchParameter>]

If specified, the variable will be configured to pass the value from the parent workflow to this workflow.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-PassValueToParent [<SwitchParameter>]

If specified, the variable will be configured to pass the value from this workflow to the parent workflow.



Required? false

Position? named

Default value False

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

None





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



PS C:\\># Add variable 'emailAddress' to workflow 'Some Workflow'



Get-AMWorkflow "Some Workflow" | Add-AMWorkflowVariable -Name "emailAddress" -InitialValue "person@example.com"

-Description "Email this user when the job fails"











RELATED LINKS

https://github.com/AutomatePS/AutomatePS