PowerShell Get-ADUser and the -Server parameter


anyone know how get-aduser cmdlet selects domain controller if -server parameter not specified?  don't want scripts connecting dc on other side of globe, i'd rather not specify dc if don't need to, since dc decommissioned day.  add logic scripts lookup dcs in current site, don't know if need that.  i'm wondering if get-aduser automatically selects 1 in current ad site, or if randomly chooses 1 round robin dns query domain name.

also, other monitoring network packets or dc logs, there easy way see dc ad cmdlets connect to? tried -verbose , -debug didn't seem anything.

thanks

the active directory powershell module uses standard dc locator process, looks closest dc ad web services enabled.  http://msmvps.com/blogs/ad/archive/2010/01/25/how-active-directory-powershell-cmdlets-find-a-dc-running-active-directory-web-services.aspx


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