bibi92
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.