magritton
6/4/2016 - 1:47 AM

SharePoint PowerShell that takes a list item that is a string and converts it to a number and then updates the list item.

SharePoint PowerShell that takes a list item that is a string and converts it to a number and then updates the list item.

    $webUrl = "https://xxxx"
    $listName = "Fleet Processing"
    # Open web and library
    $web = Get-SPWeb $webUrl
    $list = $web.Lists[$listName]
    $items = $list.items
    
    foreach ($item in $items)
    {
        $Item["UIC_String"] = $Item["UIC_Num"].ToString()
        $Item["UIC_String"]
        $Item.Update()
    }