powershell script to get users home drive (home folder)
Get-ADUser -Filter * -SearchBase "OU=TestOU,DC=TestDomain,DC=com" `
-Properties sAMAccountName,HomeDirectory | Select sAMAccountName,HomeDirectory |
Export-CSV "C:\\UserHomeDirectory.csv" -NoTypeInformation -Encoding UTF8
No comments:
Post a Comment