Subject: PSEXEC ICACLS issues on remote pc
Posted: 17 December 2014 at 3:52pm
Hey All,
This is my first post on this forum so please be kind on me and my English :p.
My problem with PSEXEC is that I'm missing some little part of the code in the following oneliner (this is example and the names are masked... :
psexec \\pcname cmd /c (icacls "c:\program Files\something" /grant:r "domainName\domain users":(OI)(CI)F /t)
I have all needed rights on this and remote pc (domain admin), and to be honest don't think it is rights issues, should be something little that I'm missing ("" or - or something like this)
Output after execution :
C:\Windows\System32>psexec \\pcname cmd /c (icacls "c:\program Files\something" /grant:r "domainName\domain users":(OI)(CI)F /t)
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
(CI)F was unexpected.
cmd exited on pcname with error code 1.
I hope there is another solution than copying bat file to remote pc and execute it there.... :/
Thank you in advance for sorting this out for me :p.