Solved

powershell to add AD GROUP to folder security with full control right

Posted on 2013-07-01
1
488 Views
Last Modified: 2013-07-03
hi,

i have a list of server in txt file like this:

server1
server2
....

i need to add security right on all this server on the same folder, the folder is c:\test\temp

i nee to add the conttrol total right for GROUP1, this group is an active directory group.

thanks for help
0
Comment
Question by:cawasaki
[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
1 Comment
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 39290507
Using PowerShell Remoting would be the best way, but I'm not sure about the OS of your target servers.  Managing security via PS is a pain in my opinion.  I prefer to combine some PS code with a utility like icacls.exe which is much easier to work with.
$scriptblock = { icacls "C:\temp\test" /grant "domain\group":F(OI)(CI) }
$servers = Get-Content servers.txt
Invoke-Command -computername $servers -scriptblock $scriptblock

Open in new window

0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Let's recap what we learned from yesterday's Skyport Systems webinar.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

628 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