Remove Security Group with icacls not working

trough

Board Regular
Joined
Oct 26, 2010
Messages
55
I've been searching and trying all day and still can't get this to work.
I have a network folder structure I've setup automatically via VBA to support a project. I need to now set the permissions and want to use VBA as well so that all of this is repeatable.
I can use icacls in VBA to set/modify all my folder permissions as desired but a security group created automatically upon folder creation (I assume due setup by IT group) is superseding some of my settings thus preventing things from working as desired. I have found if I remove these security groups all works well. So I want to automate this removal step as well but can't get it to work.
I am able to do "icacls FOLDER-PATH /inheritance:d" to disable inheritances in VBA that then allows me to remove the security group via the Windows GUI (folder properties -> security -> edit -> remove). Without this disable step I can't remove these groups.
I then try "icacls FOLDER-PATH /remove DOMAIN\SECURTIY-GROUP-NAME" but it won't work. I have tried several variations to no luck. PLEASE HELP!
Why can I remove it via the GUI but not using icacls?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The security group is network enforced, otherwise stuff I have at work would have been tweaked by now, they full scan every 30 mins. I think you would need to update the security group via an admin login to make the changes, maybe that's buried in here > https://www.computerhope.com/icacls.htm
 
Upvote 0

Forum statistics

Threads
1,216,160
Messages
6,129,215
Members
449,494
Latest member
pmantey13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top