Firefly.InvokeSqlExecute.PowerShell.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <!-- Cmdlet: Invoke-SqlExecute -->
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
    <command:details>
      <command:name>Invoke-SqlExecute</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>SqlExecute</command:noun>
      <maml:description>
        <maml:para>Runs a script containing statements supported by the SQL Server SQLCMD utility.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The Invoke-SqlExecute cmdlet runs a script containing T-SQL and commands supported by the SQL Server SQLCMD utility. One of the key features of this particular implementation is that it tracks execution through its input, including additional files brought in with :R commands so that if an execution error occurs, it will provide you with a very close location within the input file itself of where the error is, rather than only outputting the SQL server error which only identifies the line number within the currently executing batch.</maml:para>
      <maml:para>This cmdlet also accepts many of the commands supported natively by SQLCMD, such as GO and QUIT.</maml:para>
      <maml:para>This cmdlet does not support the use of some commands that are primarily related to interactive script editing. The default Invoke-Sqlcmd cmdlet chooses not to support more of such commands than this implementation. We deemed it useful to be able to run e.g. :listvar to dump the current scripting variables to the output channel within a script execution to aid in debugging, and to be able to re-route output and error messages in the middle of a run (:OUT, :ERROR) Those commands that are not supported are ignored if encountered.</maml:para>
      <maml:para>The commands not supported include :ed, :perftrace, and :serverlist.</maml:para>
      <maml:para>When this cmdlet is run, the first result set that the script returns is displayed as a formatted table.</maml:para>
      <maml:para>If subsequent result sets contain different column lists than the first, those result sets are not displayed.</maml:para>
      <maml:para>If subsequent result sets after the first set have the same column list, their rows are appended to the formatted table that contains the rows that were returned by the first result set.</maml:para>
      <maml:para>You can display SQL Server message output, such as those that result from the SQL PRINT statement by specifying the Verbose parameter. Additionally, you can capture this output by providing a script block that will receive the message along with its intended destination (StdOut/StdError) and route this data elsewhere.</maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: ConnectionString -->
      <command:syntaxItem>
        <maml:name>Invoke-SqlExecute</maml:name>
        <!-- Parameter: Query -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="0" aliases="Sql">
          <maml:name>Query</maml:name>
          <maml:description>
            <maml:para>Specifies one or more queries that this cmdlet runs. The queries can be Transact-SQL or sqlcmd commands. Multiple queries separated by a semicolon can be specified.</maml:para>
            <maml:para>If passing a string literal, do not specify the sqlcmd GO separator. Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para>
            <maml:para>There are no restrictions if passing a string variable, i.e. you can read the entire content of a .SQL file into a string variable and provide it here.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: ConnectionString -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConnectionString</maml:name>
          <maml:description>
            <maml:para>Specifies a connection string to connect to the server.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string[]</command:parameterValue>
          <dev:type>
            <maml:name>System.String[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: AbortOnError -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>AbortOnError</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell LASTEXITCODE variable if this cmdlet encounters an error.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConsoleMessageHandler -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConsoleMessageHandler</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
            <maml:para>For server message output and sqlcmd commands that produce output, this argument specifies a script block that will consume messages that would otherwise go to the console.</maml:para>
            <maml:para>The script block is presented with a variable $OutputMessage which has these fields:</maml:para>
            <maml:para>- OutputDestination: Either 'StdOut' or 'StdError'</maml:para>
            <maml:para>- Message: The message text.</maml:para>
            <maml:para>- NodeNumber: If running multiple scripts, each gets a unique number. If running in parallel, messages from all nodes will appear as they are raised, i.e. in no particular order.</maml:para>
          </maml:description>
          <command:parameterValue required="true">ScriptBlock</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.ScriptBlock</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: DisableCommands -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DisableCommands</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet turns off some SQLCMD features that might compromise security when run in batch files.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DisableVariables -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DisableVariables</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet ignores SQLCMD scripting variables. This is useful when a script contains many INSERT statements that may contain strings that have the same format as variables, such as $(variable_name).</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DryRun -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DryRun</maml:name>
          <maml:description>
            <maml:para>Indicates that a dry run should be performed. Connections will be made to SQL Server, but no batches will be executed.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: IncludeSqlUserErrors -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>IncludeSqlUserErrors</maml:name>
          <maml:description>
            <maml:para>In the MS implementation, this parameter forces a DataReader with no returned rows to iterate all available result sets in the batch. This is the only way an error raised on any statement within the batch other than the first one will raise a SqlException.</maml:para>
            <maml:para>This parameter is provided for command line compatibility with Invoke-Sqlcmd, but the execution engine behaves as though it is always set.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputFile -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="Path">
          <maml:name>InputFile</maml:name>
          <maml:description>
            <maml:para>Specifies a file to be used as the query input to this cmdlet. The file can contain Transact-SQL statements, sqlcmd commands and scripting variables. Specify the full path to the file.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string[]</command:parameterValue>
          <dev:type>
            <maml:name>System.String[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: MaxBinaryLength -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>MaxBinaryLength</maml:name>
          <maml:description>
            <maml:para>Limits the amount of binary data that can be returned from binary/image columns. Default 1024 bytes.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: MaxCharLength -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>MaxCharLength</maml:name>
          <maml:description>
            <maml:para>Limits the amount of character data that can be returned from binary/image columns. Default 4000 bytes.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>4000</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: OutputAs -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TaskAction,As">
          <maml:name>OutputAs</maml:name>
          <maml:description>
            <maml:para>Specifies the type of the results this cmdlet outputs.</maml:para>
            <maml:para>- DataRows, DataTables and DataSet set the output of the cmdlet to be the corresponding .NET data type.</maml:para>
            <maml:para>- Scalar executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.</maml:para>
            <maml:para>- Text outputs query results to the console or output file with nothing returned in the pipeline as per SQLCMD.EXE.</maml:para>
            <maml:para>- None provides no query output of any description and can result in slightly better performance as time is not spent processing result sets. Use this for example when running big database creation or modification scripts.</maml:para>
            <maml:para>Possible values: None, Scalar, DataRows, DataSet, DataTables, Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">OutputAs</command:parameterValue>
          <dev:type>
            <maml:name>Firefly.SqlCmdParser.OutputAs</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>DataRows</dev:defaultValue>
          <command:parameterValueGroup>
            <command:parameterValue required="false" variableLength="false">None</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">Scalar</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataRows</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataSet</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataTables</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">Text</command:parameterValue>
          </command:parameterValueGroup>
        </command:parameter>
        <!-- Parameter: OutputFile -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="LogFile">
          <maml:name>OutputFile</maml:name>
          <maml:description>
            <maml:para>Redirects stdout messages (e.g. PRINT, RAISERROR severity &lt; 10 and sqlcmd command output) to the given file. This can be changed in script via :OUT</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: OverrideScriptVariables -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>OverrideScriptVariables</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
            <maml:para>If set, this switch prevents any SETVAR commands within the executed script from overriding the values of scripting variables supplied on the command line.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Parallel -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>Parallel</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
            <maml:para>If set, and multiple input files or connection strings are specified, then run on multiple threads. Useful to push the same script to multiple instances simultaneously.</maml:para>
            <maml:para>- One connection string, multiple input files: Run all files on this connection. Use :CONNECT in the input files to redirect to other instances.</maml:para>
            <maml:para>- Multiple connection strings, one input file or -Query: Run the input against all connections.</maml:para>
            <maml:para>- Equal number of connection strings and input files: Run each input against corresponding connection.</maml:para>
            <maml:para>Delivery of query results to the pipeline in parallel execution mode is currently not supported. Whilst technically it is possible, results from each input script will be delivered in an undefined order. A warning will be printed and -OutputAs overridden to Text if -OutputAs is not None or Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="CommandTimeout">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer value between 0 and 65535, with 0 meaning infinite.</maml:para>
            <maml:para>The default is 0</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: RetryCount -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>RetryCount</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
            <maml:para>Sets the number of times to retry a failed statement if the error is deemed retryable, e.g. timeout or deadlock victim. Errors like key violations are not retryable.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Variable -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="SqlCmdParameters">
          <maml:name>Variable</maml:name>
          <maml:description>
            <maml:para>Specifies initial scripting variables for use in the SQLCMD script.</maml:para>
            <maml:para>Various data types may be used for the type of this input:</maml:para>
            <maml:para>- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}</maml:para>
            <maml:para>- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types</maml:para>
            <maml:para>- string array: e.g. @("VAR1=value1", "VAR2=Value 2")</maml:para>
          </maml:description>
          <command:parameterValue required="true">object</command:parameterValue>
          <dev:type>
            <maml:name>System.Object</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: ConnectionParameters -->
      <command:syntaxItem>
        <maml:name>Invoke-SqlExecute</maml:name>
        <!-- Parameter: Query -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="0" aliases="Sql">
          <maml:name>Query</maml:name>
          <maml:description>
            <maml:para>Specifies one or more queries that this cmdlet runs. The queries can be Transact-SQL or sqlcmd commands. Multiple queries separated by a semicolon can be specified.</maml:para>
            <maml:para>If passing a string literal, do not specify the sqlcmd GO separator. Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para>
            <maml:para>There are no restrictions if passing a string variable, i.e. you can read the entire content of a .SQL file into a string variable and provide it here.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: AbortOnError -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>AbortOnError</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell LASTEXITCODE variable if this cmdlet encounters an error.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConnectionTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConnectionTimeout</maml:name>
          <maml:description>
            <maml:para>Specifies the number of seconds when this cmdlet times out if it cannot successfully connect to an instance of the Database Engine. The timeout value must be an integer value between 0 and 65534. If 0 is specified, connection attempts do not time out.</maml:para>
            <maml:para>The default is 8 seconds</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>8</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConsoleMessageHandler -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConsoleMessageHandler</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
            <maml:para>For server message output and sqlcmd commands that produce output, this argument specifies a script block that will consume messages that would otherwise go to the console.</maml:para>
            <maml:para>The script block is presented with a variable $OutputMessage which has these fields:</maml:para>
            <maml:para>- OutputDestination: Either 'StdOut' or 'StdError'</maml:para>
            <maml:para>- Message: The message text.</maml:para>
            <maml:para>- NodeNumber: If running multiple scripts, each gets a unique number. If running in parallel, messages from all nodes will appear as they are raised, i.e. in no particular order.</maml:para>
          </maml:description>
          <command:parameterValue required="true">ScriptBlock</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.ScriptBlock</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: Database -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="DatabaseName">
          <maml:name>Database</maml:name>
          <maml:description>
            <maml:para>Specifies the name of a database. This cmdlet connects to this database in the instance that is specified in the ServerInstance parameter.</maml:para>
            <maml:para>- If the Database parameter is not specified, the database that is used depends on whether the current path specifies both the SQLSERVER:\SQL folder and a database name.</maml:para>
            <maml:para>- If the path specifies both the SQL folder and a database name, this cmdlet connects to the database that is specified in the path.</maml:para>
            <maml:para>- If the path is not based on the SQL folder, or the path does not contain a database name, this cmdlet connects to the default database for the current login ID.</maml:para>
            <maml:para>- If you specify the IgnoreProviderContext parameter switch, this cmdlet does not consider any database specified in the current path, and connects to the database defined as the default for the current login ID.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: DedicatedAdministratorConnection -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DedicatedAdministratorConnection</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet uses a Dedicated Administrator Connection (DAC) to connect to an instance of the Database Engine.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DisableCommands -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DisableCommands</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet turns off some SQLCMD features that might compromise security when run in batch files.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DisableVariables -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DisableVariables</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet ignores SQLCMD scripting variables. This is useful when a script contains many INSERT statements that may contain strings that have the same format as variables, such as $(variable_name).</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DryRun -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>DryRun</maml:name>
          <maml:description>
            <maml:para>Indicates that a dry run should be performed. Connections will be made to SQL Server, but no batches will be executed.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: EncryptConnection -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>EncryptConnection</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet uses Secure Sockets Layer (SSL) encryption for the connection to the instance of the Database Engine specified in the ServerInstance parameter.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: IgnoreProviderContext -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>IgnoreProviderContext</maml:name>
          <maml:description>
            <maml:para>If set, then any connection implied by the current provider context is ignored.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: IncludeSqlUserErrors -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>IncludeSqlUserErrors</maml:name>
          <maml:description>
            <maml:para>In the MS implementation, this parameter forces a DataReader with no returned rows to iterate all available result sets in the batch. This is the only way an error raised on any statement within the batch other than the first one will raise a SqlException.</maml:para>
            <maml:para>This parameter is provided for command line compatibility with Invoke-Sqlcmd, but the execution engine behaves as though it is always set.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputFile -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="Path">
          <maml:name>InputFile</maml:name>
          <maml:description>
            <maml:para>Specifies a file to be used as the query input to this cmdlet. The file can contain Transact-SQL statements, sqlcmd commands and scripting variables. Specify the full path to the file.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string[]</command:parameterValue>
          <dev:type>
            <maml:name>System.String[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: MaxBinaryLength -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>MaxBinaryLength</maml:name>
          <maml:description>
            <maml:para>Limits the amount of binary data that can be returned from binary/image columns. Default 1024 bytes.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: MaxCharLength -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>MaxCharLength</maml:name>
          <maml:description>
            <maml:para>Limits the amount of character data that can be returned from binary/image columns. Default 4000 bytes.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>4000</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: MultiSubnetFailover -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>MultiSubnetFailover</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard SQLCMD behavior. If set, enable Multi Subnet Fail-over - required for connection to Always On listeners.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: OutputAs -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TaskAction,As">
          <maml:name>OutputAs</maml:name>
          <maml:description>
            <maml:para>Specifies the type of the results this cmdlet outputs.</maml:para>
            <maml:para>- DataRows, DataTables and DataSet set the output of the cmdlet to be the corresponding .NET data type.</maml:para>
            <maml:para>- Scalar executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.</maml:para>
            <maml:para>- Text outputs query results to the console or output file with nothing returned in the pipeline as per SQLCMD.EXE.</maml:para>
            <maml:para>- None provides no query output of any description and can result in slightly better performance as time is not spent processing result sets. Use this for example when running big database creation or modification scripts.</maml:para>
            <maml:para>Possible values: None, Scalar, DataRows, DataSet, DataTables, Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">OutputAs</command:parameterValue>
          <dev:type>
            <maml:name>Firefly.SqlCmdParser.OutputAs</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>DataRows</dev:defaultValue>
          <command:parameterValueGroup>
            <command:parameterValue required="false" variableLength="false">None</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">Scalar</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataRows</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataSet</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">DataTables</command:parameterValue>
            <command:parameterValue required="false" variableLength="false">Text</command:parameterValue>
          </command:parameterValueGroup>
        </command:parameter>
        <!-- Parameter: OutputFile -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="LogFile">
          <maml:name>OutputFile</maml:name>
          <maml:description>
            <maml:para>Redirects stdout messages (e.g. PRINT, RAISERROR severity &lt; 10 and sqlcmd command output) to the given file. This can be changed in script via :OUT</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: OverrideScriptVariables -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>OverrideScriptVariables</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
            <maml:para>If set, this switch prevents any SETVAR commands within the executed script from overriding the values of scripting variables supplied on the command line.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Parallel -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>Parallel</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
            <maml:para>If set, and multiple input files or connection strings are specified, then run on multiple threads. Useful to push the same script to multiple instances simultaneously.</maml:para>
            <maml:para>- One connection string, multiple input files: Run all files on this connection. Use :CONNECT in the input files to redirect to other instances.</maml:para>
            <maml:para>- Multiple connection strings, one input file or -Query: Run the input against all connections.</maml:para>
            <maml:para>- Equal number of connection strings and input files: Run each input against corresponding connection.</maml:para>
            <maml:para>Delivery of query results to the pipeline in parallel execution mode is currently not supported. Whilst technically it is possible, results from each input script will be delivered in an undefined order. A warning will be printed and -OutputAs overridden to Text if -OutputAs is not None or Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Password -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>Password</maml:name>
          <maml:description>
            <maml:para>Specifies the password for the SQL Server Authentication login ID that was specified in the Username parameter. Passwords are case-sensitive. When possible, use Windows Authentication.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="CommandTimeout">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer value between 0 and 65535, with 0 meaning infinite.</maml:para>
            <maml:para>The default is 0</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: RetryCount -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>RetryCount</maml:name>
          <maml:description>
            <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
            <maml:para>Sets the number of times to retry a failed statement if the error is deemed retryable, e.g. timeout or deadlock victim. Errors like key violations are not retryable.</maml:para>
          </maml:description>
          <command:parameterValue required="true">int</command:parameterValue>
          <dev:type>
            <maml:name>System.Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ServerInstance -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue)" position="named">
          <maml:name>ServerInstance</maml:name>
          <maml:description>
            <maml:para>Specifies a character string or SQL Server Management Objects (SMO) object that specifies the name of an instance of the Database Engine. For default instances, only specify the computer name: MyComputer. For named instances, use the format ComputerName\InstanceName.</maml:para>
          </maml:description>
          <command:parameterValue required="true">PSObject</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.PSObject</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: SuppressProviderContextWarning -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>SuppressProviderContextWarning</maml:name>
          <maml:description>
            <maml:para>Indicates that this cmdlet suppresses the warning that this cmdlet has used in the database context from the current SQLSERVER:\SQL path setting to establish the database context for the cmdlet.</maml:para>
          </maml:description>
          <command:parameterValue required="true">SwitchParameter</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Username -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="UserId">
          <maml:name>Username</maml:name>
          <maml:description>
            <maml:para>Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine.</maml:para>
            <maml:para>The password must be specified through the Password parameter.</maml:para>
            <maml:para>If Username and Password are not specified, this cmdlet attempts a Windows Authentication connection using the Windows account running the Windows PowerShell session. When possible, use Windows Authentication.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: Variable -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="SqlCmdParameters">
          <maml:name>Variable</maml:name>
          <maml:description>
            <maml:para>Specifies initial scripting variables for use in the SQLCMD script.</maml:para>
            <maml:para>Various data types may be used for the type of this input:</maml:para>
            <maml:para>- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}</maml:para>
            <maml:para>- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types</maml:para>
            <maml:para>- string array: e.g. @("VAR1=value1", "VAR2=Value 2")</maml:para>
          </maml:description>
          <command:parameterValue required="true">object</command:parameterValue>
          <dev:type>
            <maml:name>System.Object</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: AbortOnError -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>AbortOnError</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell LASTEXITCODE variable if this cmdlet encounters an error.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: ConnectionString -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named">
        <maml:name>ConnectionString</maml:name>
        <maml:description>
          <maml:para>Specifies a connection string to connect to the server.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string[]</command:parameterValue>
        <dev:type>
          <maml:name>System.String[]</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: ConnectionTimeout -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>ConnectionTimeout</maml:name>
        <maml:description>
          <maml:para>Specifies the number of seconds when this cmdlet times out if it cannot successfully connect to an instance of the Database Engine. The timeout value must be an integer value between 0 and 65534. If 0 is specified, connection attempts do not time out.</maml:para>
          <maml:para>The default is 8 seconds</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>8</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: ConsoleMessageHandler -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>ConsoleMessageHandler</maml:name>
        <maml:description>
          <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
          <maml:para>For server message output and sqlcmd commands that produce output, this argument specifies a script block that will consume messages that would otherwise go to the console.</maml:para>
          <maml:para>The script block is presented with a variable $OutputMessage which has these fields:</maml:para>
          <maml:para>- OutputDestination: Either 'StdOut' or 'StdError'</maml:para>
          <maml:para>- Message: The message text.</maml:para>
          <maml:para>- NodeNumber: If running multiple scripts, each gets a unique number. If running in parallel, messages from all nodes will appear as they are raised, i.e. in no particular order.</maml:para>
        </maml:description>
        <command:parameterValue required="true">ScriptBlock</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.ScriptBlock</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: Database -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="DatabaseName">
        <maml:name>Database</maml:name>
        <maml:description>
          <maml:para>Specifies the name of a database. This cmdlet connects to this database in the instance that is specified in the ServerInstance parameter.</maml:para>
          <maml:para>- If the Database parameter is not specified, the database that is used depends on whether the current path specifies both the SQLSERVER:\SQL folder and a database name.</maml:para>
          <maml:para>- If the path specifies both the SQL folder and a database name, this cmdlet connects to the database that is specified in the path.</maml:para>
          <maml:para>- If the path is not based on the SQL folder, or the path does not contain a database name, this cmdlet connects to the default database for the current login ID.</maml:para>
          <maml:para>- If you specify the IgnoreProviderContext parameter switch, this cmdlet does not consider any database specified in the current path, and connects to the database defined as the default for the current login ID.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="DatabaseName">
        <maml:name>DatabaseName</maml:name>
        <maml:description>
          <maml:para>Specifies the name of a database. This cmdlet connects to this database in the instance that is specified in the ServerInstance parameter.</maml:para>
          <maml:para>- If the Database parameter is not specified, the database that is used depends on whether the current path specifies both the SQLSERVER:\SQL folder and a database name.</maml:para>
          <maml:para>- If the path specifies both the SQL folder and a database name, this cmdlet connects to the database that is specified in the path.</maml:para>
          <maml:para>- If the path is not based on the SQL folder, or the path does not contain a database name, this cmdlet connects to the default database for the current login ID.</maml:para>
          <maml:para>- If you specify the IgnoreProviderContext parameter switch, this cmdlet does not consider any database specified in the current path, and connects to the database defined as the default for the current login ID.</maml:para>
          <maml:para>This is an alias of the Database parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: DedicatedAdministratorConnection -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>DedicatedAdministratorConnection</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet uses a Dedicated Administrator Connection (DAC) to connect to an instance of the Database Engine.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: DisableCommands -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>DisableCommands</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet turns off some SQLCMD features that might compromise security when run in batch files.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: DryRun -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>DryRun</maml:name>
        <maml:description>
          <maml:para>Indicates that a dry run should be performed. Connections will be made to SQL Server, but no batches will be executed.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: DisableVariables -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>DisableVariables</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet ignores SQLCMD scripting variables. This is useful when a script contains many INSERT statements that may contain strings that have the same format as variables, such as $(variable_name).</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: EncryptConnection -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>EncryptConnection</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet uses Secure Sockets Layer (SSL) encryption for the connection to the instance of the Database Engine specified in the ServerInstance parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: IgnoreProviderContext -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>IgnoreProviderContext</maml:name>
        <maml:description>
          <maml:para>If set, then any connection implied by the current provider context is ignored.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: IncludeSqlUserErrors -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>IncludeSqlUserErrors</maml:name>
        <maml:description>
          <maml:para>In the MS implementation, this parameter forces a DataReader with no returned rows to iterate all available result sets in the batch. This is the only way an error raised on any statement within the batch other than the first one will raise a SqlException.</maml:para>
          <maml:para>This parameter is provided for command line compatibility with Invoke-Sqlcmd, but the execution engine behaves as though it is always set.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: MaxBinaryLength -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>MaxBinaryLength</maml:name>
        <maml:description>
          <maml:para>Limits the amount of binary data that can be returned from binary/image columns. Default 1024 bytes.</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1024</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: MaxCharLength -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>MaxCharLength</maml:name>
        <maml:description>
          <maml:para>Limits the amount of character data that can be returned from binary/image columns. Default 4000 bytes.</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>4000</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: InputFile -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="Path">
        <maml:name>InputFile</maml:name>
        <maml:description>
          <maml:para>Specifies a file to be used as the query input to this cmdlet. The file can contain Transact-SQL statements, sqlcmd commands and scripting variables. Specify the full path to the file.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string[]</command:parameterValue>
        <dev:type>
          <maml:name>System.String[]</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="Path">
        <maml:name>Path</maml:name>
        <maml:description>
          <maml:para>Specifies a file to be used as the query input to this cmdlet. The file can contain Transact-SQL statements, sqlcmd commands and scripting variables. Specify the full path to the file.</maml:para>
          <maml:para>This is an alias of the InputFile parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string[]</command:parameterValue>
        <dev:type>
          <maml:name>System.String[]</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: MultiSubnetFailover -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>MultiSubnetFailover</maml:name>
        <maml:description>
          <maml:para>This is an enhancement over standard SQLCMD behavior. If set, enable Multi Subnet Fail-over - required for connection to Always On listeners.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: OutputAs -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TaskAction,As">
        <maml:name>OutputAs</maml:name>
        <maml:description>
          <maml:para>Specifies the type of the results this cmdlet outputs.</maml:para>
          <maml:para>- DataRows, DataTables and DataSet set the output of the cmdlet to be the corresponding .NET data type.</maml:para>
          <maml:para>- Scalar executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.</maml:para>
          <maml:para>- Text outputs query results to the console or output file with nothing returned in the pipeline as per SQLCMD.EXE.</maml:para>
          <maml:para>- None provides no query output of any description and can result in slightly better performance as time is not spent processing result sets. Use this for example when running big database creation or modification scripts.</maml:para>
          <maml:para>Possible values: None, Scalar, DataRows, DataSet, DataTables, Text</maml:para>
        </maml:description>
        <command:parameterValue required="true">OutputAs</command:parameterValue>
        <dev:type>
          <maml:name>Firefly.SqlCmdParser.OutputAs</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>DataRows</dev:defaultValue>
        <command:parameterValueGroup>
          <command:parameterValue required="false" variableLength="false">None</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Scalar</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataRows</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataSet</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataTables</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Text</command:parameterValue>
        </command:parameterValueGroup>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TaskAction,As">
        <maml:name>TaskAction</maml:name>
        <maml:description>
          <maml:para>Specifies the type of the results this cmdlet outputs.</maml:para>
          <maml:para>- DataRows, DataTables and DataSet set the output of the cmdlet to be the corresponding .NET data type.</maml:para>
          <maml:para>- Scalar executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.</maml:para>
          <maml:para>- Text outputs query results to the console or output file with nothing returned in the pipeline as per SQLCMD.EXE.</maml:para>
          <maml:para>- None provides no query output of any description and can result in slightly better performance as time is not spent processing result sets. Use this for example when running big database creation or modification scripts.</maml:para>
          <maml:para>Possible values: None, Scalar, DataRows, DataSet, DataTables, Text</maml:para>
          <maml:para>This is an alias of the OutputAs parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">OutputAs</command:parameterValue>
        <dev:type>
          <maml:name>Firefly.SqlCmdParser.OutputAs</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>DataRows</dev:defaultValue>
        <command:parameterValueGroup>
          <command:parameterValue required="false" variableLength="false">None</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Scalar</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataRows</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataSet</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataTables</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Text</command:parameterValue>
        </command:parameterValueGroup>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TaskAction,As">
        <maml:name>As</maml:name>
        <maml:description>
          <maml:para>Specifies the type of the results this cmdlet outputs.</maml:para>
          <maml:para>- DataRows, DataTables and DataSet set the output of the cmdlet to be the corresponding .NET data type.</maml:para>
          <maml:para>- Scalar executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.</maml:para>
          <maml:para>- Text outputs query results to the console or output file with nothing returned in the pipeline as per SQLCMD.EXE.</maml:para>
          <maml:para>- None provides no query output of any description and can result in slightly better performance as time is not spent processing result sets. Use this for example when running big database creation or modification scripts.</maml:para>
          <maml:para>Possible values: None, Scalar, DataRows, DataSet, DataTables, Text</maml:para>
          <maml:para>This is an alias of the OutputAs parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">OutputAs</command:parameterValue>
        <dev:type>
          <maml:name>Firefly.SqlCmdParser.OutputAs</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>DataRows</dev:defaultValue>
        <command:parameterValueGroup>
          <command:parameterValue required="false" variableLength="false">None</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Scalar</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataRows</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataSet</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">DataTables</command:parameterValue>
          <command:parameterValue required="false" variableLength="false">Text</command:parameterValue>
        </command:parameterValueGroup>
      </command:parameter>
      <!-- Parameter: OutputFile -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="LogFile">
        <maml:name>OutputFile</maml:name>
        <maml:description>
          <maml:para>Redirects stdout messages (e.g. PRINT, RAISERROR severity &lt; 10 and sqlcmd command output) to the given file. This can be changed in script via :OUT</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="LogFile">
        <maml:name>LogFile</maml:name>
        <maml:description>
          <maml:para>Redirects stdout messages (e.g. PRINT, RAISERROR severity &lt; 10 and sqlcmd command output) to the given file. This can be changed in script via :OUT</maml:para>
          <maml:para>This is an alias of the OutputFile parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: OverrideScriptVariables -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>OverrideScriptVariables</maml:name>
        <maml:description>
          <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
          <maml:para>If set, this switch prevents any SETVAR commands within the executed script from overriding the values of scripting variables supplied on the command line.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Parallel -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>Parallel</maml:name>
        <maml:description>
          <maml:para>This is an enhancement over standard Invoke-sqlcmd behavior.</maml:para>
          <maml:para>If set, and multiple input files or connection strings are specified, then run on multiple threads. Useful to push the same script to multiple instances simultaneously.</maml:para>
          <maml:para>- One connection string, multiple input files: Run all files on this connection. Use :CONNECT in the input files to redirect to other instances.</maml:para>
          <maml:para>- Multiple connection strings, one input file or -Query: Run the input against all connections.</maml:para>
          <maml:para>- Equal number of connection strings and input files: Run each input against corresponding connection.</maml:para>
          <maml:para>Delivery of query results to the pipeline in parallel execution mode is currently not supported. Whilst technically it is possible, results from each input script will be delivered in an undefined order. A warning will be printed and -OutputAs overridden to Text if -OutputAs is not None or Text</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Password -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>Password</maml:name>
        <maml:description>
          <maml:para>Specifies the password for the SQL Server Authentication login ID that was specified in the Username parameter. Passwords are case-sensitive. When possible, use Windows Authentication.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: Query -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="0" aliases="Sql">
        <maml:name>Query</maml:name>
        <maml:description>
          <maml:para>Specifies one or more queries that this cmdlet runs. The queries can be Transact-SQL or sqlcmd commands. Multiple queries separated by a semicolon can be specified.</maml:para>
          <maml:para>If passing a string literal, do not specify the sqlcmd GO separator. Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para>
          <maml:para>There are no restrictions if passing a string variable, i.e. you can read the entire content of a .SQL file into a string variable and provide it here.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="0" aliases="Sql">
        <maml:name>Sql</maml:name>
        <maml:description>
          <maml:para>Specifies one or more queries that this cmdlet runs. The queries can be Transact-SQL or sqlcmd commands. Multiple queries separated by a semicolon can be specified.</maml:para>
          <maml:para>If passing a string literal, do not specify the sqlcmd GO separator. Escape any double quotation marks included in the string. Consider using bracketed identifiers such as [MyTable] instead of quoted identifiers such as "MyTable".</maml:para>
          <maml:para>There are no restrictions if passing a string variable, i.e. you can read the entire content of a .SQL file into a string variable and provide it here.</maml:para>
          <maml:para>This is an alias of the Query parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: QueryTimeout -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="CommandTimeout">
        <maml:name>QueryTimeout</maml:name>
        <maml:description>
          <maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer value between 0 and 65535, with 0 meaning infinite.</maml:para>
          <maml:para>The default is 0</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="CommandTimeout">
        <maml:name>CommandTimeout</maml:name>
        <maml:description>
          <maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer value between 0 and 65535, with 0 meaning infinite.</maml:para>
          <maml:para>The default is 0</maml:para>
          <maml:para>This is an alias of the QueryTimeout parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: RetryCount -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>RetryCount</maml:name>
        <maml:description>
          <maml:para>This is an enhancement over standard Invoke-Sqlcmd behaviour.</maml:para>
          <maml:para>Sets the number of times to retry a failed statement if the error is deemed retryable, e.g. timeout or deadlock victim. Errors like key violations are not retryable.</maml:para>
        </maml:description>
        <command:parameterValue required="true">int</command:parameterValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: ServerInstance -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByValue)" position="named">
        <maml:name>ServerInstance</maml:name>
        <maml:description>
          <maml:para>Specifies a character string or SQL Server Management Objects (SMO) object that specifies the name of an instance of the Database Engine. For default instances, only specify the computer name: MyComputer. For named instances, use the format ComputerName\InstanceName.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSObject</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSObject</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: SuppressProviderContextWarning -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>SuppressProviderContextWarning</maml:name>
        <maml:description>
          <maml:para>Indicates that this cmdlet suppresses the warning that this cmdlet has used in the database context from the current SQLSERVER:\SQL path setting to establish the database context for the cmdlet.</maml:para>
        </maml:description>
        <command:parameterValue required="true">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Username -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="UserId">
        <maml:name>Username</maml:name>
        <maml:description>
          <maml:para>Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine.</maml:para>
          <maml:para>The password must be specified through the Password parameter.</maml:para>
          <maml:para>If Username and Password are not specified, this cmdlet attempts a Windows Authentication connection using the Windows account running the Windows PowerShell session. When possible, use Windows Authentication.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="UserId">
        <maml:name>UserId</maml:name>
        <maml:description>
          <maml:para>Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine.</maml:para>
          <maml:para>The password must be specified through the Password parameter.</maml:para>
          <maml:para>If Username and Password are not specified, this cmdlet attempts a Windows Authentication connection using the Windows account running the Windows PowerShell session. When possible, use Windows Authentication.</maml:para>
          <maml:para>This is an alias of the Username parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: Variable -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="SqlCmdParameters">
        <maml:name>Variable</maml:name>
        <maml:description>
          <maml:para>Specifies initial scripting variables for use in the SQLCMD script.</maml:para>
          <maml:para>Various data types may be used for the type of this input:</maml:para>
          <maml:para>- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}</maml:para>
          <maml:para>- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types</maml:para>
          <maml:para>- string array: e.g. @("VAR1=value1", "VAR2=Value 2")</maml:para>
        </maml:description>
        <command:parameterValue required="true">object</command:parameterValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="SqlCmdParameters">
        <maml:name>SqlCmdParameters</maml:name>
        <maml:description>
          <maml:para>Specifies initial scripting variables for use in the SQLCMD script.</maml:para>
          <maml:para>Various data types may be used for the type of this input:</maml:para>
          <maml:para>- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}</maml:para>
          <maml:para>- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types</maml:para>
          <maml:para>- string array: e.g. @("VAR1=value1", "VAR2=Value 2")</maml:para>
          <maml:para>This is an alias of the Variable parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">object</command:parameterValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.Management.Automation.PSObject</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>Specifies a character string or SQL Server Management Objects (SMO) object that specifies the name of an instance of the Database Engine. For default instances, only specify the computer name: MyComputer. For named instances, use the format ComputerName\InstanceName.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <!-- OutputType: DataRow -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Data.DataRow</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
      <!-- OutputType: DataSet -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Data.DataSet</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
      <!-- OutputType: DataTable -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Data.DataTable</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
      <!-- OutputType: Object -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
    </command:returnValues>
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <maml:introduction>
          <maml:para>This is an example of calling Invoke-Sqlcmd to execute a simple query, similar to specifying sqlcmd with the -Q and -S options:</maml:para>
        </maml:introduction>
        <dev:code>PS C:\&gt; Invoke-SqlExecute -Query "SELECT GETDATE() AS TimeOfQuery" -ServerInstance "MyComputer\MyInstance"</dev:code>
        <dev:remarks>
          <maml:para>This is an example of calling Invoke-Sqlcmd to execute a simple query, similar to specifying sqlcmd with the -Q and -S options:</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 2 ----------</maml:title>
        <maml:introduction>
          <maml:para>This is an example of calling Invoke-Sqlcmd to execute a simple query, using the provider context for the connection:</maml:para>
        </maml:introduction>
        <dev:code>PS SQLSERVER:\SQL\MyComputer\MyInstance&gt; Invoke-SqlExecute -Query "SELECT @@SERVERNAME AS ServerName"</dev:code>
        <dev:remarks>
          <maml:para>This is an example of calling Invoke-Sqlcmd to execute a simple query, using the provider context for the connection:</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
  </command:command>
</helpItems>