Hello,
I am running the below command to list our domain users but there are accounts which are missing in the result file.
Get-Aduser -Filter -Properties * |Select samAccountName,name,displayName,department,distinguishedName,givenName,mail,@{n='PasswordLastSet';e={[DateTime]::FromFileTime($_.PasswordLastSet)}},@{n='LastLogon';e={[DateTime]::FromFileTime($_.LastLogon)}},@{n='LastLogonTimestamp';e={[DateTime]::FromFileTime($_.LastLogonTimestamp)}} |Export-CSV "C:\mydomainusers.csv" -NoTypeInformation -Encoding UTF8
Is there a limitation in displaying the number of users?
Please advise.
Thanks.
Open in new window
Where are you running your Get-ADUser command?
If running on a DC, I've seen partial results if not running from an elevated prompt, and also when querying the same DC you're running on. You could try specifying another DC with the -Server parameter.
If your query is taking a long time, it's possible to run into some timeouts.