Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » PowerGUI.org itself

Thread: Mapping Home Folder

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 1 - Pages: 1 - Last Post: Feb 6, 2012 11:14 AM by: Billy Angers Threads: [ Previous | Next ]
Samsonite

Posts: 3
Registered: 1/24/12
Mapping Home Folder
Posted: Jan 31, 2012 8:10 AM
 
  Click to reply to this thread Reply

Hey So this script was written to 1. Reset User Password; 2. Set user homefolder; 3. Move user to new container. However the script errors out when setting the homefolder can someone help a desperate man out?


cls
$users = Get-Content -Path 'C:\temp\one.txt'
foreach ($user in $users)
{
Set-QADUser $user -UserPassword "Superman12!"
Set-QADUser $user -homedrive "I:" -homefolder "\\server1\users\$user
Move-QADObject $user -NewParentContainer 'server1/NewOU/'
}



Billy Angers

Posts: 123
Registered: 11/2/11
Re: Mapping Home Folder
Posted: Feb 6, 2012 11:14 AM   in response to: Samsonite
 
  Click to reply to this thread Reply

Replace -homefolder by -HomeDirectory

Bill

Powershell tips on my blog: ITshifts.NET
Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums