Hello everyone,
I run into an issue where I seemingly can't look for users in a subdomain.
I made a small script that replaces the company of users from a .csv file. I'm looping through two domains: test.local and location1.test.local.
Now there's no issue working with test.local. But with the subdomain location1.test.local I can't seem to get anything working without the following error.
PS C:\Users\Administrator> Get-ADUser -filter -searchbase "DC=location1,DC=test,DC=local"
Get-ADuser : A referral was returned from the server
+ Get-ADUser -filter -searchbase ""DC=location1,DC=test,DC=local"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-ADUser], ADReferralException
+ FullyQualifiedErrorId : ActiveDirectoryServer:8235,Microsoft.ActiveDirectory.Management.Commands.GetADUser