To add a nested endpoint, you need to retrieve the child profile information and store it within a variable by running the following cmdlet:
$childEP = Get-AzureRmTrafficManagerEndpoint -Name childEP -ResourceGroupName PacktPub -Type AzureEndpoints -ProfileName PacktProfile
Then, you can create it by running the following cmdlet:
New-AzureRmTrafficManagerEndpoint -Name child-endpoint -ProfileName PacktProfile -ResourceGroupName PacktPub -Type NestedEndpoints -TargetResourceId $childEP.Id -EndpointStatus Enabled -EndpointLocation "West Europe" -MinChildEndpoints 1