Forum Discussion

StevieJDavis's avatar
StevieJDavis
Copper Contributor
Feb 04, 2021
Solved

Creating a View in SharePoint Online using PowerShell - using ViewScope

Hello, I am a SharePoint administrator for my organisation and I need some assistance in creating views using PowerShell. I can create the basic view, which is very straightforward and simply filters...
  • AndySvints's avatar
    Feb 04, 2021

    Hello StevieJDavis,

    I think you should create view first using Add-PnPView and then use Set-PnPView to set Values parameter for Recursive scope.

    Set-PnpView -List $ListName -Identity $ViewName -Values @{Scope=[Microsoft.SharePoint.Client.ViewScope]::Recursive}

    Reference.

    Hope that helps.

Resources