Last post Dec 05, 2010 09:50 AM by miltonsnider
Nov 24, 2010 03:12 PM|miltonsnider|LINK
I am trying to iterate through all the users in a sub node or whatever you call it and get all the users who's lockouttime is not 0. I'm assuming it is 0 if they are not locked out. I can iterate the users but I don't seem to have a grasp of how to use
the directory searcher to get a user's lockouttime value. I read so much about how so many conversions have to happen so here is what I have tried.
"(" & child.Name.ToString
SearchResult = mydom.FindOne()
Long = LongFromLargeInteger(sr.Properties("lockouttime")(0))
mystr += mylot.Date & "</br>"
Label1.Text = mystrEnd Usingregards
Nov 25, 2010 04:35 AM|smirnov|LINK
Try to indicate this property to retrieve during the search.
Dim mydom As New DirectorySearcher(domain__1, "(" & child.Name.ToString & ")", Nothing, SearchScope.Base)
and use lockoutTime <-- upper T
Nov 30, 2010 03:15 PM|miltonsnider|LINK
No, this does not seem to work. How can I enumerate all the properties of sr the searchresult?
Nov 30, 2010 03:34 PM|smirnov|LINK
If st.Properties.Contains("lockouttime") Then
it might be that this property is not an array-based and does not require using index (0)
Dec 05, 2010 09:48 AM|miltonsnider|LINK
Ok, here is the solution. Use contains on the property to make sure is exists.
Dec 05, 2010 09:50 AM|miltonsnider|LINK
Thanks. This works. iterating though the AD can return some very strange errors.