Changing the Home Drive in AD
Since we are still moving things, we had to update the home drive location.
- Get a list with all users who have a Home Drive set.
Get-ADUser -filter * -properties scriptpath, homedrive, homedirectory | ft Name, scriptpath, homedrive, homedirectory
-
I cleaned the list out and saved it as a .txt file
-
Then go through the list and update the Home Directory for each user in the list.
foreach ($SAM in Get-Content C:\HomeFolder.txt){ set-aduser $SAM -homedirectory \\<UpdatedPath>\$SAM -homedrive u: }