Solved

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

Posted on 2013-07-01
1
480 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
1 Comment
 
LVL 39

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 to another domain controller. Log onto the new domain controller with a user account t…

914 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

13 Experts available now in Live!

Get 1:1 Help Now