0

I want to export the task list which has enabled Send e-mail when ownership is assigned in the list using PowerShell:

$ctx=Get-PnPContext
$Lists = Get-PnPList 
$ctx.Load($Liss)
$ctx.ExecuteQuery()

foreach($List in $Lists){

    $Email = $List.EnableAssignToEmail
    $ctx.Load($Email)
    $ctx.ExecuteQuery()

    if($Email =$True){
       Write-Host $Emai.Title
    }
}

1 Answer 1

1

Use below PnP PowerShell command to check if E-Mail Notification is enabled on task list:

$list = Get-PnPList -Identity Tasks -Include EnableAssignToEmail 
$list.EnableAssignToEmail

Where Tasks is name of list.

Output:

enter image description here

Documentation: Get-PnPList


Follow below article to export list items to CSV:

Export SharePoint Online List Items To CSV Using PnP PowerShell

2
  • 1
    This is correct answer. Fulfill the requirement
    – Liz
    Commented Jul 2, 2021 at 10:57
  • one thing, when i connected the site with on prem it is throwing error for email enable The EnableAssignToEmail field or property does not exist.. can you pls tell me why?
    – Liz
    Commented Jul 5, 2021 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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