I have created a Powershell script to copy List items from one Sharepoint Library Column to another within the same Document Library. I am having trouble with getting the contents of list item. This is the Powershell Script...
-Add SharePoint PowerShell Snapin which adds SharePoint specific cmdlets
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
-Get the SPWeb object and save it to a variable
$web = Get-PnPWeb /sites/InterSignWorkgroup
-Variables that are used for list editing
$list = Get-PnPList "FWO History"
-Get all items in this list and save them to a variable
$items = Get-PnPListItem -List $list -Fields "Title".FieldValues
-Go through all items
foreach($item in $items)
{
$email = (Get-PnPListItem -List $list -Fields "Title").FieldValues
Set-PnPListItem -List $list -Identity $item -Values @{"Customer_x0020_Email" = $email}
}
The return value that I am getting... "System.Collections.Generic.Dictionary`2[System.String,System.Object]"
Is there a way to get the actual value of the field "Title" using Get-PnPListItem?