mhammond / pywin32

Python for Windows (pywin32) Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NetLocalGroupDelMembers remove user by sid

sfonteneau opened this issue · comments

https://learn.microsoft.com/fr-fr/windows/win32/api/lmaccess/nf-lmaccess-netlocalgroupdelmembers

According to the Microsoft documentation, The functions win32net.NetLocalGroupAddMembers and win32net.NetLocalGroupDelMembers Should work the same

But NetLocalGroupDelMembers give :
function takes exactly 3 arguments (4 given)

In my case I want to delete a user from a group starting from a sid, (it's an orphan sid)
I feel like it's not possible

I managed to add by sid with NetLocalGroupAddMembers (4 args accept)

Is this normal behavior?

Use NetLocalGroupSetMembers