I am attempting to export contacts of an Active Directory OU into a csv file. I've found lots of links on how to do this, but I would prefer not to install any additional software. Here is the command I am using:
Get-ADUser -Filter * -SearchBase "ou=Ou,dc=contoso,dc=com" -Properties * | Export-Csv "c:\somefile.csv"
Unfortunately, this command exports a csv with 0 entries.
I have tried removing the -Properties * but it still exports blank.