Forum Discussion
JimLeary
Jan 14, 2020Copper Contributor
Change The Domain To Search With Powershell
How can I change the domain I query with the Active Directory Module? We have 5 unique root domains. I use Get-ADuser, Get-ADcomputer, Get-ADObject, Get-ADReplicationSubnet, but I can only search wit...
VasilMichev
Jan 14, 2020MVP
That's what the -Server parameter is about. Or you can simply create a remote session to the corresponding DC.
- JimLearyJan 14, 2020Copper Contributor
VasilMichev I was going to mention both of those. Is it necessary to specify a domain controller? That makes sense. I wanted to be sure that there wasn't a way to just use a domain name. I was having a tough time finding a domain controller to use, but I found that in ADUC you can choose Roles under Find. You can get the list of DCs there. So then -Server worked without it being difficult.