•  914-288-5685
  •   sales@revindex.com
   Search
FR
0
 
  • Register
 
Login
Revindex
  • Products
    • -Comodo PCI Scan
    • -RapidSSL Certificate
    • -RapidSSL Wildcard Certificate
    • -Revindex Generic Skin
    • -Revindex Impersonator
    • -Revindex Omni Skin
    • -Revindex Optimizer
    • -Revindex Polo Skin
    • -Revindex Priority Support
    • -Revindex Storefront
    • -Revindex Storefront Service Plan
    • -Revindex Storefront Source
    • -Revindex Storefront Source Service Plan
    • -Revindex Task Scheduler
    • -Revindex Wiki
    • -Software License Modification
  • Services
    • -Design
    • -Programming
    • -Hosting
    • -Merchant Account
  • Resources
    • -Downloads
    • -Knowledge Base
      • --ASCII Characters
      • --HTML Entities
      • --Revindex Impersonator
      • --Revindex Optimizer
      • --Revindex Storefront
      • --Revindex Task Scheduler
      • --Revindex Wiki
      • --Standard DNN Tokens
    • -Tools
      • --Remote Ping
      • --Unit Converter
      • --URL Encoder Decoder
      • --HTML Encoder Decoder
      • --GUID Generator
    • -Blogs
  • Support
    • -Forum
    • -Frequently Asked Questions
    • -Support Ticket
  • Company
    • -About Us
    • -Customer Portfolio
    • -Customer Reviews
    • -Resellers
  • Free Trial
You are here: Resources ⁄ Knowledge Base ⁄ Revindex Task Scheduler

Revindex Task Scheduler

Email Export Print

Get connection string (PowerShell)

You can get connection strings stored in your Web.config in PowerShell by issuing the following statement:


$connectionString = [DotNetNuke.Common.Utilities.Config]::GetConnectionString("SiteSqlServer")
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
$command = $connection.CreateCommand()
$command.CommandText = "UPDATE table1 SET col1 = '1' WHERE col1 = '2'"
$connection.Open()
$command.ExecuteNonQuery()
$connection.Close()

Comments

Add comment
Previous Next

Search

Search

Contents

  • Users manual
    • Overview
    • Installation
      • Requirements
      • How to install
      • How to upgrade
      • License key
      • Security
      • Timeout
      • Timer
    • Examples
      • Execute DOS commands (Program)
      • Execute program file (Program)
      • Get connection string (PowerShell)
      • Get connection string (Razor C#)
      • Execute stored procedure (PowerShell)
      • Execute stored procedure (Razor C#)
      • Load assemblies (PowerShell)
      • Load assemblies (Razor C#)
      • Send email (PowerShell)
      • Send email (Razor C#)
      • Using functions (Razor C#)
      • Web Get (PowerShell)
      • Web Get (Razor C#)
      • Web Post (PowerShell)
      • Web Post (Razor C#)
      • Write file (Razor C#)
      • Query database (SQL)
  • Release notes

Powered by Revindex Wiki

Copyright Revindex Inc. : Terms Of Use : Privacy Statement
Copyright Revindex Inc. : Terms Of Use : Privacy Statement