i use the smlets to automate tasks in orchestrator.
I have the smlets installed and succesfully working for a few weeks.
no suddenly when i do the following:
get-scsmobjecttemplate -displayname "templatename"
i receive the error:
Get-SCSMObjectTemplate : Value cannot be null.
Parameter name: input
At line:7 char:18
+ $FoundTemplate = Get-SCSMObjectTemplate -DisplayName “templatename“
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-SCSMObjectTemplate], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,SMLets.GetSCSMObjectTemplateCommand
the Get-SCSMObjectTemplate command without parameters returns the complete template list correctly without errors.
any ideas?
Comments: ** Comment from web user: bobske **
I have the smlets installed and succesfully working for a few weeks.
no suddenly when i do the following:
get-scsmobjecttemplate -displayname "templatename"
i receive the error:
Get-SCSMObjectTemplate : Value cannot be null.
Parameter name: input
At line:7 char:18
+ $FoundTemplate = Get-SCSMObjectTemplate -DisplayName “templatename“
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-SCSMObjectTemplate], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,SMLets.GetSCSMObjectTemplateCommand
the Get-SCSMObjectTemplate command without parameters returns the complete template list correctly without errors.
any ideas?
Comments: ** Comment from web user: bobske **
I have experienced the same, it's a little random. I think it's a bug in the cmdlet. Try using -Name or -Id instead, this also finds it faster. If it's just for looking up something you could of course pipe it to a ?{$_.Displayname -like "*templatename*"}