I am about to move our file server between data centers and then rename it. Once that is done I will need to update everyone's home drive path. I have no way to test my script below but I know each piece works on its own.
Anyone see any issues or something I am missing?
Get-ADUser -Filter * -SearchBase OU=Accounts,DC=Domain,DC=Domain | `
ForEach-Object {Set-ADUser -Identity $_.SamAccountName -HomeDirectory "\\Servername\$($_.SamAccountName)`$"}