$mdp = (read-host -AsSecureString)

import-csv c:\import.csv -Delimiter ";" | foreach-object{
$prenom = $_.given
$nom = $_.surname
$name = $_.nom_complet
$sam = $_.login
$path = $_.ou

New-ADUser `
-GivenName $prenom `
-SurName $nom `
-Name $name `
-path $path `
-SamAccountName $sam `
-AccountPassword $mdp `
-ChangePasswordAtLogon $true `
-Enabled $true `
-Department Informatique `
-City Paris
}


import-csv c:\import.csv -Delimiter ";" | foreach-object{
$sam = $_.login
Add-ADGroupMember "Techs" $sam
}


