I'Ve been playing with this off and on for the last week. If you are not getting anything passed are you using the correct powershell?
Off the top of my head after your above query to populate the $imports variable you would call it then pipe for-each into to your add node script
$imports | foreach-object { your add node script here }
using $_.property where needed such as $_.uri or $_.ipaddress to expand for each $imports variable array
ping me offline and we can figure out what might work