?
Solved

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

Posted on 2014-07-25
2
Medium Priority
?
3,472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

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

Author Closing Comment

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

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

770 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