Import users from CSV
-
07 Mei 2012 18:10
hello all!
I wrote this
$OuBorn = 'OU=TESTBRAD,DC=cd1,DC=bcu,DC=edu'
$Freshmen = 'C:\csv\file.csv'
import-csv $Freshmen |`
where {new-QADUser -ParentContainer $OuBorn `
-name $_.name -sAMAccountName $_.sAMAccountName}it is to populate an ou with users listed within a csv file. Simple enough! however I get this error (same as my last error) and I don't understand why.
bradley Wyatt
Semua Balasan
-
07 Mei 2012 19:32
Why are you using "Where"? Don't you mean "ForEach-Object"? 'Where' is a filter.
Apparently teh container eohter doesn't exist or you have a permissions issue. I suspect that you are using the incorrect DN just like before.
Use this to get the parent container.DN
Use the DN you find.
¯\_(ツ)_/¯
- Disarankan sebagai Jawaban oleh Peddy1st 07 Mei 2012 19:35
- Diedit oleh jrvMicrosoft Community Contributor 07 Mei 2012 19:37
- Ditandai sebagai Jawaban oleh Bradley Wyatt 08 Mei 2012 17:46