Link to home
Start Free TrialLog in
Avatar of jonathan ahemed
jonathan ahemed

asked on

powershell script to add AD group to a large folder share near 2TB

hi there ,
is there a generic  powershell script to add to a large windows file share to add an active directory group to a large sized file share shared from a unix device called a nexstor , but the folder permissions will be  via NTFS , so basically we would need to add this AD group to the share via powershell , is this available ?
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Yes

Set-ACL, but I don't understand why you want to use powershell for this, it'll still take as long as doing it via a GUI. Your question isn't detailed enough, what are you actually trying to achieve here?

Thanks
Alex
Do you want to change the share or folder permissions?
Are there specific privileges set on files, or do they all inherit everything?
Avatar of jonathan ahemed
jonathan ahemed

ASKER

basically when try to add this permission via windows explorer , I get a network timeout error and stops , or continued prompt for access denied on some folders , folder size is near 2TB , basically the share is shared from a Unix based nexstor and I want to add in modify permission on the folder , the ad group is from a different trusted domain a and and trying this on domain B say , does this make sense ?
Just don't apply the changes to files and subfolders, then you should be set within seconds.
ok do you have a copy of the script to run , want to apply to files and subfolders, I was trying something like

$acl = $acl = (Get-Item $path).GetAccessControl('Access') \\server\fileshare

$AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("domain\group","Modify","Allow")

$acl.SetAccessRule($AccessRule)

$acl | Set-Acl \\server\fileshare



this times out or takes an age to apply
is there a standard command to add active directory global group to have NTFS modify permission on network share using this ?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.