Apply rights to target directory

Hello together

I'm looking for the equivalent in PowerShell for the "Apply rights to target directory" function of ProjectWise.
First I tried to make a script with the Import/Export Functions, the problem there is, that it doesn't overwrite users and groups that are in the target directory but not in the template directory.

Thank you in advance