#Get the Web
$Web = Get-SPWeb "http://yourSharePointSite"
#New Name for the Folder
$NewFolderName = "PagesLibSubFolderNewName";
#Get the Folder to Rename by its path
$folder = $Web.GetFolder("http://yourSharePointSite/pages/CurrentFolderName");
if ($folder.Exists)
{
#Set the New Name and Update
$folder.Item["Name"] = $NewFolderName;
$folder.Item.Update();
}
No comments:
Post a Comment