1

How do I change both the URL and description of a "Link" field using a Powershell script?

In the past I've used the following:

$newitem = $splist.Items.Add()
$newitem["Title"] = $somestuff
2
  • I've found the answer: the url stored like a simple string with url, description divided by comma. Commented Aug 23, 2011 at 5:54
  • I think Mike beat you to it. Please mark his answer as solution Commented Aug 23, 2011 at 6:18

1 Answer 1

2

Extending your example above:

$newitem = $splist.Items.Add()
$somestuff = "http://www.google.com, Google"
$newitem["Link"] = $somestuff

That will, assuming "Link" is a type of "Hyperlink or Picture" (Hyperlink), create a link that says Google and links to http://www.google.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.