I need to apply the icacls command from a server in the network, for example, server001 to a folder that is on server002. The objective is to add a local security group of server002 on a folder that is on that server, but run the command from the server001. Right now I have the following command:
icacls "\\server002\G$\permissionTest" /grant "The local group":(OI)(CI)RX
It applies the permissions, but in the ACL of the permissionTest folder on server002 I just see the SID of the group, and I need to see it on the friendly form.
Could someone please tell me how to do it?