magritton
6/4/2016 - 1:52 AM

This script runs through a list of items in a SharePoint list and changes them to upper case and then updates the list item.

This script runs through a list of items in a SharePoint list and changes them to upper case and then updates the list item.

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