Solved

How to bulk change home drive / directory mapping in Active Directory ?

Posted on 2014-07-18
4
3,369 Views
Last Modified: 2014-07-30
Hi people,

Can anyone here please assist me with how to successfully change the user Active Directory home folder attributes with powershell in bulk ?

because at the moment every single AD account H: drive is mapped to \\OLDFileServer\ADUsername statically when the service desk team creates the users. I got around 1850 user account to change over the weekend due to the new file server is replacing the old one.

From the Group Policy preference (user settings) I have already set the H: drive to the new file server, but i don't know how to automatically change the AD attributes for those 1850 AD accounts effectively to the new file server.

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
4 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 200 total points
ID: 40205080
Of course, test first, but try:

$User = Get-ADUser -Filter * -SearchBase "DC=ad,DC=company,DC=com"
Set-ADUser -Identity $User.SamAccountName -HomeDirectory  \\NewFileServer\$User.SameAccountName -HomeDrive H;

Open in new window

0
 
LVL 17

Assisted Solution

by:Spike99
Spike99 earned 150 total points
ID: 40205150
You can also select multiple users, then:  right click on the selected accounts > click on properties.   As long as the multiple selection includes only user accounts, you can change certain settings on multiple users at the same time.

Of course, with so many users, it may be too time consuming to do it that way so the script may be the way to go.

To change the home folder mapping, you would use the %username% variable, which AD will convert to the actual user's name when you apply the change.

See attachedMutliple-Items.JPG
0
 
LVL 24

Assisted Solution

by:Sandeshdubey
Sandeshdubey earned 150 total points
ID: 40210852
Migrate User Home Folders to a New File Server with all Security Permissions and Bulk Changes for Home Folder Paths.http://dilshansaminda.wordpress.com/2012/01/06/migrate-user-home-folders-to-a-new-file-server-with-all-security-permissions-and-bulk-changes-for-home-folder-paths/
0
 
LVL 8

Author Closing Comment

by:Senior IT System Engineer
ID: 40230678
Thanks !
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

732 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