How to query Active Directory to Fetch more than 1000 rows using Sql Server–Part II

Continuing from where I left in my previous post.  The Stored Procedure mentioned in my previous post cannot be used to query pwdlastset from AD since it is stored in Integer8Date format which cannot be interpreted by sql server. So when there is a requirement to query pwdlastset from AD we need to use a…