I am just trying to add a library template through powershell and it is not working. Any idea where thing might be going wrong.
here is the code snippet.
$sourceFile = "C:\mystuff\Library.stp"$templateName = "Library.stp"AddListTemplate -siteUrl "mysite.com/.../testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateNameThe term 'AddListTemplate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At line:1 char:16+ AddListTemplate <<<< -siteUrl "mysite.com/.../testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateName + CategoryInfo : ObjectNotFound: (AddListTemplate:String) , Com mandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Any help would be greatly appreciated.
Many Thanks in advance.
Well the error is pretty self-explanatory. It does not recognise the command "AddListTemplate".
If "AddListTemplate" is a function, then you need to load the function, or maybe its part of a module? No-one has any way of knowing this from the 3 lines of code you posted, so we're just guessing.
Since it's something internal to your organisation, you should really ask the person responsible for supporting and maintaining it.
Powered by IDERA