SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a powershell to import csv into a list. There is one field "ProviderURL" in the list. In the csv I had and it imported fine. Howerver, I would like it to be Contoso as Description and as a link.

How would I format my csv so that powershell will add providerURL in this fashion?

btw, here is the ps script

$spWeb = Get-SPWeb
$spList = $spWeb.lists["TestList"]
$csvFile = "c:\\import.csv"
foreach($item in Import-CSV $csvFile)
    $newItem = $spList.Items.Add()
    $newItem["Title"] = $item.Title
    $newItem["ProviderURL"] = $item.ProviderURL
share|improve this question
up vote 0 down vote accepted

Here is how to approach your issue.

  1. Make sure your csv have an additional column for url description. Let's call that "urlDescription"
  2. Now add following to your PS script.

    $field = New-Object Microsoft.SharePoint.SPFieldURLValue

    $field.Description = $item.urlDescription

    $field.URL = $item.ProviderURL

    $newItem["ProviderURL"] = $field

I hope this helps.

share|improve this answer
It worked like charm. THIS IS FIRST TIME I GOT A QUICK RESPOND. I FEEL LIKE THIS SITE IS DEAD AS I HARDLY GET ANY REPLY. THANKS Monica for your help. – Laura Burkis Apr 4 '12 at 16:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.