How to get Get-AdUser to work with different domains


hello,

i have 3 domains:

domain.com

domain.abc.com

domain.co.nz

i have get-aduser powershell script works first domain listed 

get-aduser -filter {enabled -eq "true" -and title -like "*"} -searchbase "dc=domain, dc=com" -properties hiredate, department 

but not work other 2.  not sure how write searchbase parameter.  can help?


paul

you have add -server parameter.

get-aduser -filter {something -like "*something*"} -server other.domain.com

you can target global catalog won't properties querying domain directly:

get-aduser -filter {name -like "*chris*"} -server domaincontroller:3268


- chris ream -

**remember, if find post helpful, or answer, please mark appropriately.**



Windows Server  >  Directory Services



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file