1

I am using SharePoint PnP Powershell to create a view. In order to do this, I am using New-PnPView command and everything works. What I would like to do is set view's internal name.

for e.g. List Title will be 'All Items' but the internal name should be 'AllItems.aspx'

For now, New-PnPView takes Title as internal name.

3

This is a CSOM limitation wherein the ViewCreationInformation object doesnt have a property to set the URL. It takes only the Title value.

Also, the correct commandlet to create view is Add-PnPView. Would suggest that you update your PnP PowerShell to the latest version.

So, what you can do is use the Add-PnPView commandlet to create a view as:

Add-PnPView -List "My List" -Title "AllItems" -Fields "Title","Address"

After that, you can use the Set-PnPView commandlet to set the view's title as below:

Set-PnPView -List "My List" -Identity "AllItems" -Values @{Title="All Items"}"
  • Excellent, will definitely give it a try – Ravi Khambhati Jul 2 '18 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.