Richard
Wed Sep 17 10:53:02 CDT 2003
Will K wrote:
"Will K" <sendtowilliam_king80@hotmail.com> wrote in message
news:OkB3YgSfDHA.3076@tk2msftngp13.phx.gbl...
> Hi
>
> I'm trying to remove any / all entries from an ACL. I have found some
> scripts to read/add or modify an ACE but cannot find any resources to
> delete.
>
> What I'm trying to do is write a script to clear out and ACL and then add
a
> single ACE to the list.
Hi,
There is a RemoveACE method of the ACL object, similar to the AddAce method.
However, it makes more sense to create a new ACL object and replace the old.
This is done, for example, when the ACE's in an ACL are re-ordered. The only
example I have is a program to deny a user permission to change their own
password. When 2 ACE's are added, the program re-orders the DACL. It creates
a new DACL and replaces the old:
http://www.rlmueller.net/Cannot%20Change%20PW.htm
A program that simply removes ACE's with the RemoveACE method is
demonstrated here:
http://www.rlmueller.net/Can%20Change%20PW.htm
--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site -
http://www.rlmueller.net
--