Solved

Using Powershell to bulk change the Home folder path of AD objects based on %username" ?

Posted on 2014-07-25
2
3,253 Views
Last Modified: 2014-07-30
Hi All,

Can anyone here please assist me in creating the Powershell script to change the Each user Home Drive attributes with powershell from the old value of \\OldFileServer\JohnD into \\NewFileServer\JohnD that can be applied for all my user AD accounts in the Domain\Company Users ?

Thanks.
0
Comment
2 Comments
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 500 total points
ID: 40219526
get-aduser -filter {homedirectory -like "\\OldFileServer\*"} -properties HomeDirectory | % {set-aduser $_ -homedirectory "\\NewFileServer\$($_.SamAccountName)"}
0
 
LVL 7

Author Closing Comment

by:Senior IT System Engineer
ID: 40230675
thanks !
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question