Avatar of Piedra
Piedra
Flag for Argentina asked on

Issues with a powershell command get-aduser

We're experiencing an issue with a powershell command. We would like to run this command to simply retrieve the information on several objects. Unfortunately, we've been experiencing issues running the command against most (if not all) of our DCs. This is an issues that is going on intermitently, sometimes it happens sometimes it doesnt. Besides this error, I havent noticed any issues with our DCs. Does any one have any idea what this could mean?

Command:
get-aduser lesquivel -server celldepotdc2

Error:
get-aduser : A local error has occurred
At line:1 char:1
+ get-aduser lesquivel -server celldepotdc2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (lesquivel:ADUser) [Get-ADUser], ADException
    + FullyQualifiedErrorId : ActiveDirectoryServer:8251,Microsoft.ActiveDirectory.Management.Commands.GetADUser


Further details:
- We have over 30 DCs in the domain which are 2008R2
- All admins in the team are experiencing this same error

Any insights on this would be much appreciated.
PowershellActive DirectoryDomain Controller

Avatar of undefined
Last Comment
Piedra

8/22/2022 - Mon
FOX

I assume you
1. launched powershell as an administrator
2. Ran  Import-Module ActiveDirectory (if it didn't load automatically)
3. Please list the fdqn of the domain after -server   not just  celldepotdc2
Qlemo

Does it work if name a different DC, or none at all at that time?
footech

Check events on both the client and the DC you specify with the -server parameter to see if there's anything around the same time as the command was run.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Piedra

ASKER
Thank you all for your responses. Let me answer them:

@FOX
1. Yes, the command is being ran as an administrator.
2. The import was done automatically. We still ran the import-Module ActiveDirectory and the error occured again.
3. The FQDN is celldepot.local

@Qlemo
4. This is going on on most DCs (intermittent) but there are a few of them is happening all the time.

@footech
5. I will check the events on event viewer on both client and server and see whats up. I will come back with your answers.
FOX

Leo on one  of your domain controllers run the command
repadmin /showrepl  


YOu need to verify if your DCs are replicating successfully
Piedra

ASKER
Hello all, sorry for my delayed response.

I'm not seeing any events that might indicate an issue related to this command. THe DCs are replicated succesfully as per repadmin /showrepl. No issues there.

Any other ideas?
I will keep looking for events to see if I can catch something that might indicate an issue but so far, I dont see any,
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Piedra

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Piedra

ASKER
Issue resolved.