Forum Discussion
StevieJDavis
Feb 04, 2021Copper Contributor
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...
- 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}Hope that helps.
AndySvints
Feb 04, 2021Iron Contributor
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}Hope that helps.
StevieJDavis
Feb 05, 2021Copper Contributor
AndySvints that worked like a charm, thank you very much!