1
Vote

ipmoTemplate string resource is designed to work with PS modules only

description

The getInvocationString() uses Resources.ipmoTemplate format string to generate a PS script for both PS Snapin and Module. The following code is Resources.ipmoTemplate content

$Error.Clear()
{0} -Name "{2}"{3} -ErrorAction Stop
if ((Get-Module -Name {1}) -eq $null) {{
throw New-Object Exception $Error[0].Exception.Message
}}
Get-Command -Module {1} -CommandType {4} | %{{
$_ | Add-Member -Name syn -MemberType noteproperty -Value (get-help $_) -PassThru
}}

But Get-Module -Name {1} is always $null for PS Snapins. Please use correct Get-PSSnapin command for PS Snapins.

comments