Get-ADUser not caching results when querying a remote forest
Potential bug in the Get-ADUser commandlet when querying a remote forest:
$myForest | Get-ADUser -filter *
$myForest[0] # <-- this doesn't reach back to a DC to return the user
$remoteForest | Get-ADUser -filter * -server dc1.remoteforest.com
$remoteForest[0] # <-- this will call back to a DC to fetch the user even though it's been successfully retrieved in the previous line
See https://stackoverflow.com/questions/54790231/get-aduser-not-caching-results for a better explanation.
