Hello,
We have a bunch of document libraries where we have a List Column that contains information. We have recently added a content type to the libraries and would like to copy the information from the List Column to a field in the content type.
How do I use powershell to refer to these fields?
If I have the Document Library (List) as a variable $list then I assume that I refer to the field as $list.$column. But how do I do the same for the document? How do I iterate through each document in the library to accomplish the same thing with a for loop?
Something like:
$list = $web.GetList("My List Name")
foreach ($document in $list)
{$document.Fields["Document Field"] = $list.Fields["List Field"]
$document.update()
}
Any help would be greatly appreciated,
Matt