Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3697
  • Last Modified:

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

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
Senior IT System Engineer
Asked:
Senior IT System Engineer
1 Solution
 
Justin YeungSenior Systems EngineerCommented:
get-aduser -filter {homedirectory -like "\\OldFileServer\*"} -properties HomeDirectory | % {set-aduser $_ -homedirectory "\\NewFileServer\$($_.SamAccountName)"}
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
thanks !
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now