Here is the script:
$compnames = import-csv "$env:userprofile\\Documents\\list.csv" $User = "username" $Password = "password"