private void deleteUserDiskQuota() { try { var dskuser = diskQuotaControl.FindUser(user.SID); diskQuotaControl.DeleteUser(dskuser); } catch (COMException) { // we can't determine if a disk quota exists for a given user // so we just have to try to delete it and catch the exception } }
public void DeleteQuota() { var dskuser = _diskQuotaControl.FindUser(_sid); _diskQuotaControl.DeleteUser(dskuser); }