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

techresearch7777777 1,801 Reputation points

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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 32,736 Reputation points

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


    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