Hello again,
Here is an update to the things that I have tried and a workaround if you ever experience this problem.
More information on the environment:
The workstation computer account running the script is in the same AD domain as the DC. The user account running the script is an Administrator of the workstation.
The user account is a member of the enterprise file admins group. The group has been added to the computer policy of the DC - with access to the Restore Files Right. (I read that this will allow acl and ownership change rights on the server). The same group has full control permissions on the directory structure. I also added the user to the backup operators group on the domain.
Using PSCX im able to see using Set-Priviledge, and Get-Priviledge that the 'SeRestorePriviledge' is Enabled in the powershell session.
After all this I still get the Set-Acl error. (Adding the user to Domain Admins works - not good).
So for the time being I have given up on the Set-Acl cmdlet and found a free utility.
SetACL by Helge Klein
Homepage: http://setacl.sourceforge.net
Parsing the SetAcl command like so fixes the problem for now hope this helps someone.
Dods.
$a = c:\temp\setacl.exe -on "$($newprofiledir)" -ot file -actn ace -ace "n:$($principal);p:change;i:so,sc,np;m:grant"
$b = c:\temp\setacl.exe -on "$($newprofiledir)" -ot file -actn setowner -ownr "n:$($principal)"