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?
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?