I am importing a csv file to create user accounts.. i have it working.. but now i want to have the script look at a variable, and based on that variable set other variables, like the ou or home directory path etc..
here's what i have so far.. it seems to select the 2nd option ASH unless i # it out then it selects the first option..i am clearly missing something simple here.... i can't just use an else statement as i will need many lines of logic to support the many different ou's, home dir shares etc.. globally...
import-csv $csv | foreach-object {
$site=$_.site
$HomeDArl= "\\teleflex\global\home\medical\na\arl"
$HomeDASH= "\\ashfs01.arrowintl.com\user"
if ($site='ARL'){
$homed = $HomeDArl
}
if ($site='ASH'){
$homed =$HomeDASH
}
}