Add-PnPFile – format-default : The collection has not been initialized

Today I tried to upload a document to SharePoint Online using the Add-PnPFile command from the PnP PowerShell. [code lang=text] Add-PnPFile -Path $path/DocumentTemplates/MyTemplate.docx -Folder DocumentTemplates -Web $web -Values @{Title="MyTemplate";FileLeafRef="MyTemplate.docx"} [/code] … read the office-365-pnp-sharepoint-add-spofile-format-default-the-collection-has-not-been-initialized-it-has-not-been-requested-or-the-request-has-not-been-executed-it-may-need-to-be-explicitly-req post