This followin command works in cmd line :
Invoke-Item "icacls.exe c:\test\ /T /C /grant "domain\user:(OI)(CI)F""
but in powershell cmd line :
The term 'OI' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:71
+ Invoke-Item "icacls.exe c:\test\ /T /C /grant "domain\user:((OI <<<< ))((CI))F""
+ CategoryInfo : ObjectNotFound: (OI:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How can I resolve this problem?