mrbios Posted June 11, 2012 Posted June 11, 2012 Currently all my users home directories point to: \\fs1\home$\\ and for staff: \\fs1\home$\teacher\ Now i've recently setup our data in two locations using DFSR which means i now wish to point everything to: \\domain.local\Store\home$\\ Obviously it's only the bit prior to home$ that needs to change, but can anyone suggest an easy way of doing this on a mass scale?
FN-GM Posted June 11, 2012 Posted June 11, 2012 Select all the users. Right Click > Properties and populate the home area path with \\domain.local\Store\home$\year11\%username% the %username will automatically correct itself on each account. 1
mrbios Posted June 11, 2012 Author Posted June 11, 2012 Select all the users. Right Click > Properties and populate the home area path with \\domain.local\Store\home$\year11\%username% the %username will automatically correct itself on each account. That'll work for the vast majority of my folders, only problem is two or three are "messy" When we add new years in they have their own year started folder and their own corrosponding AD folder, but an old tech prior to us did something different and had all the folders based on birth year, so year groups were split in half through AD folders.....a bizarre way to do it but we're slowly weeding it out year by year. Will have a look at bulk AD for that bit and see if i can sort that thanks
Gatt Posted June 11, 2012 Posted June 11, 2012 I did something similar.... OU for each Year Group and Select all users in that OU and mass change the home folders to \\server.domain\Home$\Students\\%username% (replacing Year XX with the OU in question)
ascott2 Posted June 11, 2012 Posted June 11, 2012 #Set-HomeDirectory.ps1 param ( [parameter(Mandatory = $true)] [string]$yeargroup ) Get-ADUser -SearchBase "OU=$yeargroup,OU=Users,DC=test,DC=local" | ForEach { Set-ADUser $_ -HomeDirectory ('\\fileserver\home\$yeargroup\' + $_.SamAccountName) } I have not tested this powershell script but I think that should work. Then you could run it for each year group, if the years are in seperate OU's eg Set-HomeDirectory.ps1 -yeargroup 11
chaos Posted June 13, 2012 Posted June 13, 2012 ldifde is great for this sort of thing. See Using LDIFDE to import and export directory objects to Active Directory Export all users along with their profile path to an ldf file Edit it in Word using a Find and Replace approach Save as a text file and import.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now