ICACLS can save ACL of a tree with the command below, where a_dir_root
is the root of this tree:
icacls a_dir_root\ /save AclFile /T /C /Q
Of course, groups are identified as SIDs. I want to restore them on another server, which has the same group set by name, but their mapped SID aren't the same as the source server.
Is there a simple and elegant way, or should I plan writing a script for this task, ie some lines to replace into the ACL file all SIDs by the mapped names? (an automated version of a brute force replacement)
Once I used a Bash script running on Cygwin, but of course it got hit by BLODA. I'm asking before starting coding