Link to home
Start Free TrialLog in
Avatar of PhillipsPlastics
PhillipsPlastics

asked on

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.
Avatar of PhillipsPlastics
PhillipsPlastics

ASKER

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???
can you post the code?
Try the following..

icacls 'w:\prod\$libname\$dirname' /grant 'DOMAINNAME\$groupname":F'
ASKER CERTIFIED SOLUTION
Avatar of prashanthd
prashanthd
Flag of India 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
It ended up being icacls 'w:\prod\$libname\$dirname' /grant ""DOMAINNAME\$groupname":F"

Thanks!