header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Create New SQL Instance using Powershell 2.0 Remote
Last Post 22 Feb 2010 02:26 PM by Chad Miller. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TomUser is Offline
New Member
New Member
Posts:2
Avatar

--
22 Feb 2010 07:11 AM
    Hi All I wish to create a new SQL Instance on a remote machine via Powershell. I simply wish to call the SQL command line application and pass in the credentials and use the SQL Express install exe to install the instance automatically. I have the following code: cmd /c " "cd C:\...\SQLEXPR32.EXE /qb ADDLOCAL=ALL INSTANCENAME="MyInstanceName" SECURITYMODE=SQL SAPWD="MyPassword" SQLAUTOSTART=1 "" This works fine when run from powershell on my local machine, SQL express opens up and installs the instance with no user input needed. But when I create a remote session to a remote PC, and try and call this code, the powershell window hangs forever as if the process is still going, but no instance is created on the Remote Machine. I have the SQL Express exe on the remote machine, and I have powershell installed with a module that has the code to install the new instance via SQLCMD. Not sure if this is possible or if anyone has any tips on how to go about doing this? Thanks
    Chad MillerUser is Offline
    Basic Member
    Basic Member
    Posts:160
    Avatar

    --
    22 Feb 2010 02:26 PM

    This may not have anything to do with Powershell. The command-line install for SQL Server is tricky/buggy to begin with.

    Suggestions:
    Check the SQL Server setup log on the remote machine See http://msdn.microsoft.com/en-us/lib...43702.aspx for details
    Try installing on the remote system interactively from a regular command prompt.
    A quick web search for SQLEXPR32.EXE command line returns a few blog posts that indicate issues just running the utility from a normal command-line:
    http://blogs.msdn.com/astebner/arch...10435.aspx
    http://blogs.msdn.com/astebner/arch...spx#605285
    http://www.developersdex.com/sql/me...024&page=2

    The last link points to an issue if the current user isn't logged in. Don't know if this is your issue, hopefully the setup log file will contain some type of error message.

    I don't know of many people using the command-line install of SQL Server and even fewer using the command-line installation + Powershell. You may want to post your question in a SQL Server forum


    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer