2

I installed PowerShell 4 over the weekend and ever since then, I get the error "The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet, function" when I try to run the Invoke-Sqlcmd commandlet.

This has been working just fine for months until PowerShell 4.

I have SQL 2012 SP1 installed with CU7. VS 2013 with .NET 4.5.1. As far as I can tell, I have all the latest everything that PowerShell requires.

How can I get this fixed?

Invoke-Sqlcmd : The term 'Invoke-Sqlcmd' 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:1

I asked on SuperUser a couple days ago, but am not getting much traction there.

asked Jan 14, 2014 at 13:20

1 Answer 1

3
answered Jan 14, 2014 at 13:23
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, that got the commandlet to load in the powershell window. I also had to re install PowerShellTools.msi from the SQL 2012SP1 feature pack. Now to just figure out why TeamCity won't load it.
And I figure out that TeamCity 8.0 doesn't support powershell 4, but TC 8.1 will. youtrack.jetbrains.com/issue/TW-33319

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.