4

I know this is a really simple task and I have done it a thousand times and it worked every time, but I cannot rename a list via powershell anymore.

$List = $web.Lists["mylist"]
$List.Title = "newtitle"
$List.Update()

When I check the Title in a seperate powershell window the name is correct. Also if I check the List in SharePoint Manager2013 the Title is the new one.

But in the GUI it stays the same. I tried reloading the page and clearing the cache and everything, but it does not change.

What can be the problem here?

1
  • Are you using minimal download strategy on the site? It's always activated on new sites. Commented Jun 16, 2015 at 7:22

1 Answer 1

9

Could be a language / culture issue. Try this script instead. It renames the list for all in SPWeb supported cultures.

Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue

$web = Get-SPWeb http://mysite

ForEach($culture in $web.SupportedUICultures)
{
    [System.Threading.Thread]::CurrentThread.CurrentUICulture=$culture;
    $list = $web.Lists.TryGetList("mylist") 
    $list.Title = "newtitle";
    $list.Update();
}
$web.Dispose()
1
  • Glad it helped :) Commented Jun 16, 2015 at 8:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.