I need your suggestions…When I run First Cmdlet it works fine however Second option which I want to use does not work and giving me error “Error getting objects: The server has returned the following error: invalid enumeration context”
I tried resultpagesize with different values but it does not work either. I check the second Cmdlet with measure command and it is taking 17 minutes to fetch AD objects and time out time is mentioned in the ADWS server is 30 minutes.
Could you please help me to understand what is wrong I am doing so I can troubleshoot this error as we do not want to user first optionas and we want to import all account irrespective date and time.
First Cmdlet $from = ((Get-Date).AddDays(-100)).date
$to = ((Get-Date).AddDays(0)).date
Thanks for the reply, I will try now what you suggested and let you know output though I wanted to remove date filter so that we can get the data without mentioning days.
Do you really All Properties ?? Try with just the properties you need as -Filter * -Properties * is going to bring down a lot of stuff you probably don’t require
Here also we are fetching all properties, I understand your point that It may bring nonindexed properties as well which is no use for me or for application but I wanted to make same as previous. Just looking to get rid of days filter so it could fetch and updated records without seeing the number of days…
But the data set you are bringing back with dates in it will be a lot smaller. Try with just the basic properties and see if that is enough info (on the without dates query)
Yes, data is small when we try to run it manually putting days -500 to 0, -500days to -1000days, -1000days to -1500days and list go on till 4000days. We are not sure as of what all properties would be enough but surely will see that option . I was wondering If we could do this something about filter we need not run manually by entering days, however, seems unreal. Thanks for the reply and suggestion.