Invoke-Sqlcmd abruptly stopped working RRS feed

  • Question

  • Have been using Invoke-Sqlcmd in some Powershell scripts, however tonight it abruptly stopped working in between uses.  I have tried rebooting the computer and cannot figure it out.  It just returns the same brain-dead message ("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.") and quits.  Obviously something got messed up bad, but how exactly could that happen and what am I supposed to do about it?
    Friday, March 4, 2011 10:32 AM


  • Hello,

    Could you please post a (part of a) PowerShell script you are using where the error occurs? Are you using SqlPs or the common ps?

    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing
    Friday, March 4, 2011 10:48 AM