Link to home
Start Free TrialLog in
Avatar of Biertan
Biertan

asked on

Script to change Home drive in AD User Properties

Does anyone have a script available to change the current Home drive to point to another server in AD User properties for everyone, please?
User generated image
Avatar of Steven Wells
Steven Wells
Flag of Australia image

hi,
There are hundreds of scripts on the internet depending on what you need to do.

I have also used this application http://www.wisesoft.co.uk/software/bulkadusers/default.aspx which allows forupdates from csv and excel file. It makes it easer to do updates for sets of staff without any scripting.

Steve
Avatar of Biertan
Biertan

ASKER

hi Steven
I need to change the property to point to a new network share, via a powershell script if I can find one - directly manipulate the AD user property to change the Home Drive location.
I would use a csv file with usernames with a get-content loop. with this command

http://blogs.technet.com/b/heyscriptingguy/archive/2013/06/04/creating-a-home-drive-with-windows-powershell-part-1.aspx

get-content c:\users.txt | SET-ADUSER % –HomeDrive ‘Z:’ –HomeDirectory ‘\\CONTOSO-FPS\Users$\%

that won't work but it's a start. I can supply full script if you like.  up to you
Avatar of Biertan

ASKER

I would really appreciate the full script, with many thanks.
Will have something to you tomorrow
SOLUTION
Avatar of Spike99
Spike99
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Biertan

ASKER

hi Alicia,


I have just under 900 users to change the attribute for.
Single OU.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial