PowerShell script = how to remediate "This security ID may not be assigned as the owner of this object."

techresearch7777777 1,981 Reputation points
2024-06-18T09:28:50.9966667+00:00

Hello, I created a Windows Server 2016 PowerShell script which copies & replaces files from Source Files Location to a Network Disk Share Target Files Location that are 1 day old as follows:

robocopy G:\Source_Files_Location \Network_Disk_Share\Target_Files_Location\ /mov /MAXAGE:1 /COPY:datso

This script looks like does complete copy & replace the .bak files that are 1 day old but strangely shows following message:

"This security ID may not be assigned as the owner of this object."

I've researched around many sites and tried different adjustments but still stumped to remediate the above security ID warning message.

Am willing to try any other commands as long its in either a PowerShell or Command Prompt (CmdExec) type of script that I can call on...can anyone provide me script that can do this please?

Thanks in advance.

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2024-06-18T13:19:57.3933333+00:00

    This link suggests that the issue is related to using a group as the owner.

    https://superuser.com/questions/1660249/robocopy-command-gives-me-error-if-owner-is-set-to-group-instead-of-user

    Why are you copying the owner? The "O" in "/COPY:datso". Do you have an application that relies on the file owner to be set?

    What about the permissions? Do you have mostly uninherited permissions on the files/folders? Do you have the "CREATOR OWNER" ACL set on the source folder? If you are moving files, why don't you just let them inherit the permissions from the destination folder?

    This question has nothing to do with Powershell.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.