czwartek, 11 maja 2017

Installing SQL Server via PowerShell script - Be Sharp

  Installing SQL Server via PowerShell script

     
       In this post you will learn how to automatize SQL server installation process .
       It will reduce your time and energy because whole process of installation by script 
       takes around 20-25 minutes and can be use multiple times.
     
       Let's go !  


 1.   Installing .Net Framework 3.5  


  Use this PowerShell line for install :

 “ Install-WindowsFeature Net-framework-Core -Source D:\Sources\sxs “If .Net    Framework 3.5 hasn’t already installed you should see this:



     2.  Preparing SQL ConfigurationFile.ini for PowerShell script 

   This file will be used for prepare our installing script.Configuration file contains whole settings which you set during process of configuration. To get this file you have to run trough SQL Server installation - configuration until “Ready to Install” step and find our ConfigurationFile using this directory.(picture below).Or use already generated ConfigurationFile.ini in some old installation of SQL Server. 


      
Next step is to change ‘QUITE’ mode on “TRUE” in ConfigurationFile.ini 

 Open your ConfigurationFile.ini and fing line with 'QUIET' :

 Default settings:

 


 Proper settings :

 


      Next step is to add line at the bottom of ConfigurationFile.ini without qoutes :

        “ ;  Accept the license agreement
  IAcceptSQLServerLicenseTerms="True"   “






 Uncomment ‘UIMODE’

 


 


                                     Add this two lines in ConfigurationFile.ini


   SQLSVCPASSWORD="PASSWORD"
   SAPWD="PASSWORD"
  This lines are required when Mixed Mode of Authentication is used.
  They included passwords given during step below
:


 



                                                             Script:
    $configfile = "PATH_TO_THE_FILE\ConfigurationFile.ini"
$command = "DISK /ConfigurationFile=$($configfile)"
Invoke-Expression -Command $command   


            
                   
“ $command = "D:\setup.exe /ConfigurationFile=$($configfile)" “



3. Run script


When everything is set up in ConfigurationFile.ini save all changes and paste the script in PowerShell command line :






Be Sharp Software 

1 komentarz:

  1. Payment strategies have turn into simpler for customers and on-line players as digital and cell funds have been extra widely accepted. Furthermore, on-line fee providers present a safe and secure way of transaction, which has boosted their use in the on-line gaming business. Furthermore, the extra simple and convenient fee options encourage players to participate in the gambling sector. The comfort of remote funds opens up a world of possibilities for on-line gamblers to promote and drive money flow. E-wallet providers for on-line gaming are also obtainable from corporations like PayPal and Neteller. Furthermore, Neteller presents transactions in 26 different currencies with no 메리트카지노 transaction charges.

    OdpowiedzUsuń