Q:

PS - Runbook AddTaxonomyField -Pushnotifaction error

I'm trying to add some Taxonomyfield with Azure Automation.
1 field at the time is working well... but multiple at one gives me a constant error : push-notifactions are not enabled for this site.
Param
(
  [Parameter (Mandatory= $true)]
  [string] $siteUrl,
  [Parameter (Mandatory= $true)]
  [string] $docLib
)

#CONNECTION
$tenantName = "mytenant"
$username = "uberadmin@mytenant.be"
$password = "prettysecretpassw" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList $username,$password

Connect-SPOService -Url https://$tenantName-admin.sharepoint.com/ -Credential $cred

#VARIABLES

Connect-PnPOnline -Url $siteUrl -Credentials $cred
Add-PnPTaxonomyField -List $doclib  -DisplayName "DocType" -InternalName "Document Type" -TermSetPath "ESC|Document Type" -AddToDefaultView 
Add-PnPTaxonomyField -List $doclib  -DisplayName "Product" -InternalName "Product" -TermSetPath "ESC|Product" -AddToDefaultView 
Add-PnPTaxonomyField -List $doclib  -DisplayName "Team" -InternalName "Team" -TermSetPath "ESC|Team" -AddToDefaultView 

Error (dutch)

Add-PnPTaxonomyField : De functie voor push-meldingen is niet
  geactiveerd op de site   https://esconline.sharepoint.com/sites/EB010.
  At line:44 char:9  + Add-PnPTaxonomyField -List $l.Title -DisplayName
  $displayNam ...  +
CategoryInfo : WriteError: (:) [Add-PnPTaxonomyField], ServerException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Fields.AddTaxonomyField

A:

Looks like SharePoint sometimes throws intermittent error about the push notifications feature. Due to that, looks like your code isn't working as expected even though it is correct.
To fix that issue, you can enable the Push Notifications feature as below and then execute your code:
Enable-PnPFeature -Identity 41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092

Reference  - The push notifications feature is not activated on the site sharepoint 2013

