# csv file and then add them to the local Administrators group.
<# example CSV layout to be saved as C:\Temp\Users.csv
UserName,FullName,Description
JBloggs,Joe Bloggs,Blogger
JDoe,Jane Doe, Dough Maker
#>
$strComputer=$env:computername
# Import CSV to $AllUsers
$AllUsers =
Import-CSV "C:\Temp\Users.csv"
# Set temp password
$TempPassword =
"P@ssword1"
foreach ($User in $AllUsers)
      {
      write-host Creating user account $user.Username
      $objOU = [adsi]"WinNT://."
      # Create user
account
      $objUser = $objOU.Create("User", $User.Username)
      # Set password
      $objuser.setPassword($TempPassword)
      # Set FullName
      $objUser.FullName = $User.FullName
      # Set Description
      $objUser.Description = $User.Description
      # User must change password on next log on
      $objuser.PasswordExpired
= 1
      # Save the info
      $objuser.SetInfo()
      # Add each user
account to local Administrators group
      $computer = [ADSI]("WinNT://" + $strComputer + ",computer") 
      $group = $computer.psbase.children.find("Administrators")  
      $group.Add("WinNT://" + $strComputer + "/" + $user.Username)  
      }
