views:

38

answers:

3

I'm having some trouble with Invoke-Sqlcmd

From the normal powershell console, it's fine. But I'm unable to use it from the ISE.

I can confim the addin is loaded

>Get-PSSnapin SqlServerCmdletSnapin100
Name        : SqlServerCmdletSnapin100
> add-PSSnapin SqlServerCmdletSnapin100
Add-PSSnapin : Cannot add ... SqlServerCmdletSnapin100 ... it is already added.

when I try to use it

> Invoke-Sqlcmd
The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function ...

Any ideas on what the issue could be?