Right click menu Copy using script

Hi all:
is it possible to use copy(right click menu) command in Hierarchy panel thru scripting ?

upto my knowledge it is not possible rather we can use instantiate function.