0

How can I set a nocrawl on a list using SPPnp powershell? I tried the following but doesnt work:

$list = Get-PnPList -Web $Web.Title -Identity $l
if($list)
{
    write-host $list.Title

    $list.NoCrawl = $true
    $list.Update()
    #$context.ExecuteQuery()
    Invoke-PnPQuery 
}
0

Solved it by calling the executequery as follows:

$list.Context.ExecuteQuery()

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.