I am trying to query a couple OUs in our AD environment to find out home directories and home drives for our users.
I've tried a couple variations, and I get output of most of the properties of user accounts in the same OU, so I know I can read the properties. However the Homedrive and homedirectory properties show with no values whether I specifically look for those properties or choose to view all of the properties of the users. If I look in AD Users and Computers at the Profile tab for many of the users I do see a drive and UNC path listed for them. What is awry?
Get-ADUser -SearchBase "OU=Users,OU=CityOU,DC=CompanyDC=Com" -filter * -Properties * | Select Name,samAccountName,homedrive, homedirectory
Running a DSQuery on users yields the same problem. It shows other property values but nothing listed in homedirectory and homedrive.