Forum Discussion
Nitrox
Oct 28, 2022Copper Contributor
Script to add an AD Security group to multiple User Home drive folders
Hi All I'm trying to put together a script to perform the following task: First to add an AD Security Group named "ADMigration" and assign it (Read access) to a large list of User Home Drives...
nitrox2000
Apr 17, 2023Copper Contributor
Hi,
Thank you for the advice from both of you, much appreciated.
@Varun
I used the script you supplied and it worked fine but the group did not inherit down through all subfolder and files.
Can you tell me where to add this in the script as i have tried to modify various parts but I continue to get an error?
Many thanks
Nitrox
Thank you for the advice from both of you, much appreciated.
@Varun
I used the script you supplied and it worked fine but the group did not inherit down through all subfolder and files.
Can you tell me where to add this in the script as i have tried to modify various parts but I continue to get an error?
Many thanks
Nitrox
nitrox2000
Apr 17, 2023Copper Contributor
Ok so ignore last question as managed to get it to work using the following:
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($GroupName, 'Read','ContainerInherit,ObjectInherit', 'NoPropagateInherit', 'Allow')
Works perfectly.
Thank you both for the advise once again, very much appreciated and thankful
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($GroupName, 'Read','ContainerInherit,ObjectInherit', 'NoPropagateInherit', 'Allow')
Works perfectly.
Thank you both for the advise once again, very much appreciated and thankful