Having found the correct command and means of exporting it, Ive just discovered that the data isnt completely accurate. Ive just cross referenced some of the accounts that the the export has empty cells for the Home Directory but the user in AD has got one.
Any reason for this? This data now looking useless to me!
PowershellActive Directory
Last Comment
asavener
8/22/2022 - Mon
asavener
Make sure you're connecting to the right domain controller via the powershell command; it's possible that one or more of your DCs aren't synchronizing properly.
nashiooka
If you want to lock into a particular DC you can user the -Server parameter on the Get-ADUser cmdlet. In those cases I usually focus in on the PDC Emulator for a variety of reasons.
Code would be something like below, combining with previous question:
Can you conjure up an example of the inconsistency?
MJB2011
ASKER
Why do I need to change the command. Its inaccurate not incorrect data its bringing back.
MJB2011
ASKER
Yes I can. in the output data the users it captures with home Directories is correct, however the data is incorrect as there are users are no of in AD that have home directories that are not showing up.
OK. I ran the same command on teh other DC and it brought back the correct result. Yes both report same data.
nashiooka
You mean there are users you know have home directories that are not showing up in the report? If so you should check a few of them manually through Active Directory Users & Computers. Consider that there are other ways to map home folders like net use .../home.
It's very unlikely Get-ADUser is missing something that matches the query.
Let me know what you find.
MJB2011
ASKER
I run the command on DC01 it brings back wrong results