Solved

icacls invalid parameter on group name

Posted on 2011-03-10
5
2,833 Views
Last Modified: 2012-05-11
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
Comment
Question by:PhillipsPlastics
  • 3
  • 2
5 Comments
 

Author Comment

by:PhillipsPlastics
Comment Utility
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
 
LVL 12

Expert Comment

by:prashanthd
Comment Utility
can you post the code?
0
 
LVL 12

Expert Comment

by:prashanthd
Comment Utility
Try the following..

icacls 'w:\prod\$libname\$dirname' /grant 'DOMAINNAME\$groupname":F'
0
 
LVL 12

Accepted Solution

by:
prashanthd earned 500 total points
Comment Utility
Missed to remove a double quote, try this..

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

Author Comment

by:PhillipsPlastics
Comment Utility
It ended up being icacls 'w:\prod\$libname\$dirname' /grant ""DOMAINNAME\$groupname":F"

Thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article shows how a content item can be identified directly or through translation of a navigation type. It then shows how this information can be used to create a menu for further navigation.
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now