I am writing a script to pull all the users who has a homedirectory on a certain server using a wild card. It runs and no errors but it exports nothing and doesn't run long.
Any assistance would be appreciated:
Any assistance would be appreciated:
Code:
$csvfile = "C:\Scripts\Home-Dir-Lookup.csv"
Get-QADUser -SizeLimit 0 -SearchRoot "ou=Ccntr-J,OU=Region Coastal,OU=Central Division,DC=home,DC=com,DC=com" -HomeDirectory *'
-ObjectAttributes @{homeDirectory='\\fla*'} -IncludeAllProperties |'
Select-Object LogonName,HomeDirectory |
Export-Csv $csvfile