Use the AddChildCommand from the UI
Undoing of Add-Child works