//
IADsGroup *pGroup;
//
//
// Bind to a known group object.
//
ADsGetObject(TEXT("WinNT://MyDomain/Groups/Administrators"),
IID_IADsGroup,
(void**)&pGroup);
//
// Remove Jane and John from the Administrators group.
//
pGroup->Remove(TEXT("WinNT://MyDomain/Users/John"));
pGroup->Remove(TEXT("WinNT://MyDomain/Users/Jane"));
//
// Cleanup.
//
pGroup->Release();