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

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
    Jul 2 '21 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
    Jul 5 '21 at 12:54

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.