Documentation Center

Executing and troubleshooting PowerShell scripts

You install and upgrade SDL Web databases and software components by executing scripts using Windows PowerShell. If you are unfamiliar with PowerShell, you may need to perform some actions before you can execute the scripts.

Procedure

  1. On a supported Windows machine, click the Start button in the lower-left corner of your screen and type PowerShell in the search box to quickly access and open the Windows PowerShell program.
  2. In PowerShell, navigate to the folder on the installation media that contains the PowerShell script you want to execute.
  3. Enter ls to view the available scripts.
  4. If you are installing a database, then note that by default, PowerShell applies timeouts of 10 minutes to your database operations. If you expect this to be insufficient because your database is too large, change the timeout values by setting them as follows:
    $DatabaseScriptConnectTimeout=VALUE
    $DatabaseScriptCommandTimeout=VALUE

    where VALUE is the timeout value in seconds (for example, 3600 sets a 1-hour timeout value).

  5. Run the script. For example, enter the following command to run a database script:
    & '.\Install DATABASENAME database.ps1' 

    where DATABASENAME is the name of the database you are installing.

  6. Optional: If you get the following errors:
    File <ScriptName>.ps1 cannot be loaded because the execution of scripts is disabled on this system
    Enable the running of PowerShell scripts by entering the following PowerShell command:
    Set-ExecutionPolicy AllSigned
    Could not load file or assembly <Path>\Database\Scripts\Tridion.Database.Management.dll or one of its dependencies (only for database scripts)
    In Windows Explorer, navigate to the installation media \Database\Scripts\ folder, select Tridion.Database.Management.dll and click Properties. In the General tab, click Unblock. Click OK to close the dialog. Then restart PowerShell and perform the same steps as before.
  7. Follow the instructions in the PowerShell console to install the database or software component.