Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3480
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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