< Back

Copy-AMTask

Sat Jan 11, 2020 2:31 am

NAME Copy-AMTask



SYNOPSIS

Copies an AutoMate Enterprise task.





SYNTAX

Copy-AMTask [-InputObject] <Object> [[-Name] <String>] [[-Folder] <Object>] [[-Connection] <Object>]

[<CommonParameters>]





DESCRIPTION

Copy-AMTask can copy a task object within, or between servers.





PARAMETERS

-InputObject <Object>

The object to copy.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <String>

The new name to set on the object.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Folder <Object>

The folder to place the object in.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <Object>

The server to copy the object to.



Required? false

Position? 4

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:

Task





OUTPUTS

Task





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



PS C:\\># Copy task "Start Service" from server1 to server2



Get-AMTask "Start Service" -Connection server1 | Copy-AMTask -Folder (Get-AMFolder TASKS -Connection server2)

-Connection server2









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Copy task "Start Service" with new name "Restart Service"



Get-AMTask "Start Service" | Copy-AMTask -Name "Restart Service"











RELATED LINKS

https://github.com/AutomatePS/AutomatePS