I logged on $domain1
I got the following error when running Get-ADUser -Filter {samaccountname -eq $userid} -Server $domain2
Get-ADUser : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services
$domain2 exists. I can access it by using ADUC and users logging in it. I also tried fqdn with same error. Any suggustion? Thanks