The OS is Windows server 2012.
I am trying to use command icacls C:\folder\targetfile /grant domain\usergroup:(rx)
to give permissions on certain file.
The command works when executed on command line.
But when I run it from batch file I get the following error:
domain\usergroup: No mapping between account names and security IDs was done.
I am executing this command as domain admin. Domain admin has full control over target file and folder. Local admin works no better.
I also get same when trying to execute batch from Task Scheduler.
How can I make this work from batch file?