Link to home
Start Free TrialLog in
Avatar of bibi92
bibi92Flag for France

asked on

call icacls on powershell script

Hello,

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?

Thanks

bibi
ASKER CERTIFIED SOLUTION
Avatar of Xaelian
Xaelian
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial