Created
January 29, 2018 15:33
-
-
Save dmadelung/49faf431f838dabedd70e39ddfe80ef7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$list = Get-PnPList "List" | |
$view = Get-PnPView -List $list -Identity "All Documents" | |
$vto = $view.TypedObject | |
$view.Context.Load($vto) | |
$view.Context.ExecuteQuery() | |
$vto.ViewQuery = "<OrderBy><FieldRef Name=`"Modified`" Ascending=`"False`" /></OrderBy><Where><Neq><FieldRef Name=`"DocumentState`" /><Value Type=`"Text`">Obsolete</Value></Neq></Where>" | |
$view.Update() | |
$view.Context.ExecuteQuery() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment