Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

How to make list template via PowerShell in SP Online?

$
0
0

I am needing to copy a list as a template, but the list is too big, and the online template tool fails (yes even without including content).  I was given this script to run, but it appears to be for on-prem.  Is this possible online?  I need an option asap.  My project is at a standstill.

$web = Get-SPWeb -Identity "https://mycompany.com/"
$list = $web.Lists["KDL_Migration_Log"]
$list.SaveAsTemplate("DrawingLog.stp","DrawingLog", "Drawing Log", $false)


I have tried this:

Connect-SPOService -Url "https://mycompany.com/mysite"
$web = Get-SPOSite("https://mycompany.com/mysite")
$web = $site.RootWeb
$list = $web.Lists["KDL_Migration_Log"]
$list.SaveAsTemplate("DrawingLog.stp","DrawingLog", "Drawing Log", $false) 

I'm still struggling with the connection, but even if I get past that, I'm not finding a SaveAsTemplate CmdLet in the online SP module.  

Please advise!!



Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>