Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

icacls invalid parameter on group name

Posted on 2011-03-10
5
Medium Priority
?
3,312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:PhillipsPlastics
ID: 35097054
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
ID: 35108222
can you post the code?
0
 
LVL 12

Expert Comment

by:prashanthd
ID: 35108511
Try the following..

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

Accepted Solution

by:
prashanthd earned 2000 total points
ID: 35108521
Missed to remove a double quote, try this..

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

Author Comment

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

Thanks!
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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