Biertan
asked on
Script to change Home drive in AD User Properties
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 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
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
ASKER
I would really appreciate the full script, with many thanks.
Will have something to you tomorrow
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hi Alicia,
I have just under 900 users to change the attribute for.
Single OU.
I have just under 900 users to change the attribute for.
Single OU.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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