0

How to display the custom list templates available within a site collection in SharePoint 2010 using Powershell script?

I tried to use the below code:

$site = Get-SPSite "https://..."
$web = $site.RootWeb
$template = $site.GetCustomListTemplates($web)

But it is not returning anything.But there are custom list templates within the list template gallery.

Thanks so much for your answer.

2

I think it's something related to your secure site "https". On my end it is working

  $site= Get-SPSite "http://webapp/sites/site1"
  $SPWeb = $site.RootWeb
  $site.GetCustomListTemplates($SPWeb)
0

It might be because of the permissions of the account under which you are running the script. You should at least have designer permissions. Give it a try.

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.