Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3659
  • Last Modified:

icacls invalid parameter on group name

Hello,
I am in need of immediate assistance if at all possible.

I am trying to use the icacls command in one of my powershell scripts.  I am having a problem when I try to run the command as follows:

icacls "w:\prod\$libname\$dirname" /grant "DOMAINNAME\$groupname":F

the error I receive during my script is Invalid Parameter "DOMAINNAME\the_group_name"

I have checked and "the_group_name" exists in Active Directory under the DOMAINNAME domain.  I am unsure why it is receiving this as an invalid parameter?

Attempting to run this command from Server 2008 R2

Thanks.
0
PhillipsPlastics
Asked:
PhillipsPlastics
  • 3
  • 2
1 Solution
 
PhillipsPlasticsAuthor Commented:
If I take the variables out, and just put in a folder path and a group name I get the same error when attempting to run this command from powershell.  From my workstation, if I run the command from a command prompt, the command works???
0
 
prashanthdCommented:
can you post the code?
0
 
prashanthdCommented:
Try the following..

icacls 'w:\prod\$libname\$dirname' /grant 'DOMAINNAME\$groupname":F'
0
 
prashanthdCommented:
Missed to remove a double quote, try this..

icacls 'w:\prod\$libname\$dirname' /grant 'DOMAINNAME\$groupname:F'
0
 
PhillipsPlasticsAuthor Commented:
It ended up being icacls 'w:\prod\$libname\$dirname' /grant ""DOMAINNAME\$groupname":F"

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now