arrDirectReports = objUser.GetEx("directReports") If Err.Number = E_ADS_PROPERTY_NOT_FOUND Then WScript.Quit Else For Each strValue in arrDirectReports Set objUserSource = GetObject("LDAP://" & strValue) objUserSource.PutEx ADS_PROPERTY_CLEAR, "manager", 0 objUserSource.SetInfo Next End If