Hello,
I am try to disable a bunch of accounts on a different sub-domain from a CSV file. I've used the same code on the main domain without any issues, so this only fails on "DC=DEV,DC=FABRIKAM,DC=COM". Here is the code I am using:
Get-ADUser -Identity test.user -credential dev.fabrikam.com\ben.admin -searchbase "DC=dev,DC=fabrikam,DC=com"
I've tried isolating the issue by both adding and removing the credential param and by searching for an account I know for sure is on dev.fabrikam.com, but I still get the following error:
Get-ADUser : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Get-ADUser -Identity test.user -credential dev.fabrikam.com\ben.admin -se ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-ADUser], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.ActiveDirectory.Management.Commands.GetADUser
Any ideas would be appreciated. Thanks,