Solved

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

Posted on 2014-07-25
2
3,207 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

A safe way to clean winsxs folder from your windows server 2008 R2 editions
A brief introduction to what I consider to be the best editor for PowerShell.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now