import-csv with twist

by Apr 25, 2014

Hi there

I have csv that looks like this:

upn,email

victort@test.corp,victor.test@test.com

$importedusers = Import-CSV c:scriptsusers.csv
foreach ($user in $importedusers)

If I wanted to add some prefix that I need for another command in the script later(lets say sip address)

how would I do it?

I tried something like this but doesn't seem to work(fails on the sip construction part):

Enable-CsUser –Identity $user.UPN -SipAddress  "sip:" +$user.email -RegistrarPool testing.test.corp -Verbose