none
SharePoint Adding document library doesn't work anymore RRS feed

  • Question

  • I've had a script that worked fine when adding SharePoint Online document libraries based on a template.
    Now without changing anything I get the following error:

    Exception setting "ListTemplate": "Cannot convert the "Microsoft.SharePoint.Client.ListTemplate" value of type "Microsoft.SharePoint.Client.ListTemplate" to type "Microsoft.SharePoint.Client.ListTemplate"."

    script extract:

    $ListTemplates = $Context.Site.GetCustomListTemplates($Site)

    $Context.load($Web)

    $Context.load($Site)

    $Context.load($listTemplates)

    $Context.ExecuteQuery() 

    $ListTemplate = $ListTemplates | ? { $_.InternalName -eq $ListTemplateInternalName }

    $ListCreation = New-Object Microsoft.SharePoint.Client.ListCreationInformation

    $ListCreation.Title = $ListTitle

    $ListCreation.ListTemplate = $ListTemplate

    Contents of $ListTemplate:

    AllowsFolderCreation : True

    BaseType             : DocumentLibrary

    Description          : FB_DocBibTemplate

    FeatureId            : 00bfea71-e717-4e80-aa17-d0c71b360101

    Hidden               : False

    ImageUrl             : /_layouts/15/images/itdl.png?rev=44

    InternalName         : FB_DocBibTemplate.stp

    IsCustomTemplate     : True

    Name                 : FB_DocBibTemplate

    OnQuickLaunch        : True

    ListTemplateTypeKind : 101

    Unique               : False

    Context              : OfficeDevPnP.Core.PnPClientContext

    Tag                  :

    Path                 : Microsoft.SharePoint.Client.ObjectPathIdentity

    ObjectVersion        :

    ServerObjectIsNull   : False

    TypedObject          : Microsoft.SharePoint.Client.ListTemplate

    Is anyone else experiencing this issue?

    Tuesday, June 26, 2018 10:59 AM