Forum Discussion
Aug 29, 2016
Rename a document stored inside a SharePoint document library using Office Dev PnP
How to rename a document/file stored inside a documentlibrary using Office Dev PnP? I haven't found a cmdlet for it. Specifically I want to rename the OneNote Notebook called "Team Site Notebo...
- Aug 30, 2016
I might be misinterpreting the question, but does this help?
"MoveTo" can be used to rename files.
Connect-SPOnline -url [yoururl] $ctx = Get-SPOContext $web = Get-SPOWeb $file = $web.GetFileByServerRelativeUrl("[your file url]") $file.MoveTo("[your NEW server-relative url]", 'Overwrite') $ctx.ExecuteQuery()
Deleted
Aug 30, 2016you just want to rename this file on each provisioned site? or do you also upload the file? maybe a extention provider would help. Kr, Paul