Powershell XML importnode from different file
You're really close but ImportNode only makes a copy and doesn't actually insert the copied nodes into the document. Try this:
$newNode = $newxml.ImportNode($xml.get_DocumentElement(), $true)
$newxml.DocumentElement.AppendChild($newNode)
$xml.Save("$pwd\profile.xml")