Need help on Powershell for SQL 2008 R2

  • Folks ,

    I created powershell script to be used with SQL 2008 which uses Invoke-sqlcmd . The script runs fine on SQL 2008 environment , however when i try to run the same on other server with SQL 2005 installed on it , i get an error .

    On troubleshooting further it was found that "Microsoft® Windows PowerShell Extensions for SQL Server® 2008 R2" needs to be installed on the server .

    Can someone guide if the above installation for Powershell extensions has any prerequisite . The environment on this this needs to be installed is production and hence every positive and negative points needs to be taken into consideration .

    Kindly help !!!

  • What windows version are both the servers on? Powershell comes installed by default on windows 2008 but you will need to install it on earlier version.

    you can get the installer from here.

    http://support.microsoft.com/kb/968929/en-us

    depending on your script you may not need to install powershell on the sql 2005 server but run your script remotely.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

  • Thanks for replying !!

    The windows server editions are Server 2008 R2 ( where the script is running fine ) and Server 2003 ( where we need to run the script ) .

    There is a limitation that we can't run the script remotely as the servers are in different domains are blocked by firewall settings ..

  • The powershell requirements are listed in the link provided. You would need SP2 for windows 2003 and CLR 2.0 which is include with .net framework 2.0, 3.0 and 3.5SP1

    You would need to restart the server after installation so if you do install Powershell, plan accordingly.

    Bob
    -----------------------------------------------------------------------------
    How to post to get the best help[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply