Mark Minasi's Tech Forum
Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
meloao

New Friend (or an Old Friend who Built a New Account)
Registered:
Posts: 55
Reply with quote  #1 
I am working on a code to modify NTFS permissions on folders using icalcs.   When I run the following line of code, I get an error

Invoke-Expression "icacls '\\serverName\share\folder1\Another Folder' /grant ad-security-group-name:'(CI)(OI)(RC,RD,RA,REA,X,GR,R,RX)'" 2>> c:\temp\test.log 


icacls :  '\\serverName\share\folder1\Another Folder: The parameter is incorrect.
At line:1 char:1
+ icacls \\serverName\share\folder1\Another Folder /grant ad-security-group-name ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (\\serverName\share...r is incorrect.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError


Please note that 'Another Folder' does include a space which is why I used  '  symbol.  

0
cj_berlin

Avatar / Picture

Senior Member
Registered:
Posts: 336
Reply with quote  #2 
Hi,

works here with a local group.

Does the group name contain spaces or other nefarious characters? 

__________________
Evgenij Smirnov

My personal blog (German): http://www.it-pro-berlin.de/
My stuff on PSGallery: https://www.powershellgallery.com/profiles/it-pro-berlin.de/
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.