Error: "The term 'execute-sqlscript' is not recognized as the name of a cmdlet, function, script file, or operable program."
dear folks,
i want run sql server 2008 database script using powershell. i've tried following link
http://serialseb.blogspot.com/2007/09/executing-sql-scripts-from-powershell.html
but, ps c:\windows\> execute-sqlscript "local.sql" "dbserver" @{key="value"; key2="value2"}
command throws following error
"the term 'execute-sqlscript' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify path correct , try again. @ line:1 char:18+ execute-sqlscript <<<< "c:\users\administrator\desktop\transitionpoint\database\transitionpoint.sql" "isspk" @{key="value"; key2="value2"} + categoryinfo : objectnotfound: (execute-sqlscript:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception"
please let me know how fix it.
thanks,
sohaib khan
execute-sqlfile "local.sql" "dbserver" @{key="value"; key2="value2"}
Windows Server > Windows PowerShell
Comments
Post a Comment