bin/SnsMsSqlPsModule.dll-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <!-- Cmdlet: Invoke-SnsMsSqlObjectInsert -->
  <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-SnsMsSqlObjectInsert</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>SnsMsSqlObjectInsert</command:noun>
      <maml:description>
        <maml:para>This Cmdlet Imports Collection Of Objects Into Specified Table Within Specified DataBase Into Specified MS SQL Server And Instance.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>This Cmdlet Imports Collection Of Objects Into Specified Table Within Specified DataBase Into Specified MS SQL Server And Instance.</maml:para>
      <maml:para>This CmdLet Does Allow Users Without Or With Limited Knowledge About SQL Query Language To Work With DataBases. The CmdLet Creates The SQL Query And The SQL Parameters On Its Own. The User Has No Need Even To Know What SQL Injection Is And How To Avoid It.</maml:para>
      <maml:para>There Are Cases When We Have Large Collections Of Similar Objects That Corresponds Exactly To Specific Table In A DataBase And We Need To Insert Them At Once Taking The Advantage Of The SQL Transactions. This CmdLet Is Made Exactly For Those Cases. Like For Example We Need To Insert The Information About All Users In The Environment Into A DataBase Table Named Users. Then We Simply Query The Active Directory About All Users And Pipeline The Output To This CmdLet.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>The CmdLet Have Three Parameter Sets Which Represent The Allowed Combination Of Input Parameters Based On The Way That The CmdLet Connects To The Destination DataBase.</maml:para>
      <maml:para>The CmdLet Support Only Authenticated Connection The MS SQL Server Instance. There Are Three Possible Ways This To Be Achieved:</maml:para>
      <maml:para>- Using The Windows Authentication - The CmdLet Uses The Windows Single Sign On To Connect To The DataBase Server Instance As The Currently Logged On User. It Is Preferable For Scripts Executed In Interactive Mode Which Eliminates The Need OF Additional Logon Steps. Whenever The Script Or The Automation Are Executed Unattended On Schedule As A Service This Might Lead To Unexpected Behavior. In Those Cases Is Preferable To Be Used Some Of The Next Authentication Options. Using This Option Can Be Authenticated Only Domain Or Windows Local Accounts.</maml:para>
      <maml:para></maml:para>
      <maml:para>- Via Specifying UserName And Password In Clear Text - In This Way, The UserName And The Password Are Included In The SQL Connection String, That Way Send Over The Network. In This Way, The User Relies Only On The Encryption Of The SQL Connection. Using This Method Impersonation Of The User That Connects To The DataBase Is Possible. Which Does Allow The Automations To Be Run With One Service Account And The DataBase Connection To Be Established With Different Service Account. Using This Option Can Be Authenticated Either Domain Or Windows Local Accounts Or SQL Users.</maml:para>
      <maml:para>- Via Specifying [System.Management.Automation.PSCredential] Object. In This Way, The Password Is Not Kept In Clear Text. This Is Considered As More Secure. The Authentication Happens In The Same Way As The Windows Authenticates The Users. Therefore The Password Cannot Be Intercepted During The Authentication Even If The SQL Connection Encryption Is Already Breached. Using This Method Impersonation Of The User That Connects To The DataBase Is Possible. Which Does Allow The Automations To Be Run With One Service Account And The DataBase Connection To Be Established With Different Service Account. Using This Option Can Be Authenticated Only SQL Users.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>In The Begin Method The CmdLet Initializes A Connection To The Destination MS SQL DataBase And Queries It About The System Time. Thus Way Verify The Connection.</maml:para>
      <maml:para>Then CmdLet Queries The Destination Database About The Schema Of The Destination Table. Using The Schema And The Value Specified In "ConflictClause" Parameter, The CmdLet Creates Automatically The SQL Query Which Will Be Used For Inserting Of The Specified Objects. The SQL Query And The SQL Parameters Which Will Be Used In The SQL Query Are Enumerated Solley On The Table Schema And The Input Objects Are Not Evaluated At All. This Would Means That If The Input Objects Have Property With Name That Corresponds To A Column With The Same Name In The Destination Table, Then The Value Of That Property Will Be Inserted In The Corresponding Cell On The Corresponding Row Of The Table. If The Object Have No Property That Corresponds To Certain Column Will Be Inserted DB NULL Value. If The Object Contains Properties Which Have No Corresponding Columns The Values Of Those Properties Will Be Ignored. In Human Language Using The Example Above About The Users Table, Would Mean That We Can Pipeline All The AD Accounts To The CmdLet And Only The AD Attributes With Columns In The Destination Table Schema Will Be Inserted The Rest AD Attributes Will Be Ignored. The Columns That Do Not Correspond To Any AD Attribute Will Have Value DB NULL.</maml:para>
      <maml:para>Whenever The Destination Table Have An Autoincrement Identity Column, The Value Taken From The Input Objects Will Be Not Included In The INSERT And / Or UPDATE SQL Queries.</maml:para>
      <maml:para>The CmdLet Enumerates The Table Primary Key From The Table Schema. Whenever The Primary Key Column Is Enumerated Properly The CmdLet Uses Different SQL Queries Depending On The Value Specified In ConflictClause CmdLet Parameter. This Does Allow Any Possible Conflicts And Primary Key Uniqueness Violations To Be Managed By The CmdLet And Insert The Specified Objects Without Errors. Please Keep In Mind That The CmdLet Is Intended To Be Used For Bulk Uploads As Fast As Possible. Therefore It Uses A Single Transaction To Insert All Of The Objects. Therefore In Case An Error Is Thrown All The Inserted Within The Transaction Data Will Be Reverted. It Is Not Possible To Preserve The Data Inserted Before The Error. If That Is Needed Please Consider Either Splitting The Data On Batches, Or Use Invoke-SnsMsSqlQuery In A Way So Every Insert To Be Different Transaction. The ConflictClause Parameter Accepts Only Predefined Values. For More Details Please Check The Parameter Section Bellow. It Is Important To Avoid Using The Options For Error Handling Whenever The Destination Table Have Autoincrement Column. This Increases The Complexity And You Might Receive Unexpected Results. Avoiding The Usage Of This Parameter When The Destination Table Have Autoincrement Columns Is Only A Recommendation, Programmatically The Usage Of That Parameter Is Not Restricted So The Users That Can Manage The Additional Complexity To Be Able To Take Advantage Of That. In Case The Destination Table Have No Primary Key Or The CmdLet Fail To Enumerate It, The Values Specified Within The ConflictClause Parameter Is Ignored And The CmdLet Process The Data With "Fail" Option. If That Happens The User Is Informed With A Warning.</maml:para>
      <maml:para>Using The Enumerated Table Schema And The ConflictClause, The CmdLet Generates The SQL Query That Will Be Used For Insert / Update The Data And The SQL Parameters. In Order To Eliminate The Possibility About SQL Injection, The CmdLet Manages The Data Using SQL Parameters. Having The Table Schema Already Enumerated, The CmdLet Uses Parameters Add Method To Initialize The Parameters With Explicitly Specified Type And Length. This Improves The CmdLet Performance, Since There Is No Need OBS To Evaluate The Specified Data.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>During The Processing Of The Objects Coming From The Pipeline, Each Object Is Converted To SQL Parameters And Inserted Using The Already Enumerated SQL Query. For The Conversion Are Used The Column Names From The Destination Table Schema. In Case The Input Object Have No Property That Corresponds To The Table Column The Enumerated Parameter Have Value DBNULL. The Input Object Properties That Have No Corresponding Columns In The Destination Table Are Ignored. Column Name Matching Against The Input Object Property Name Is Case Sensitive Exact Matching. Whenever The Value Of A Property Have Type That Does Not Match The Destination Column DataType, The SQL Server Will Try To Cast The Value. If Cast Is Not Possible SQL Error Is Thrown And The Whole Transaction Is Reverted.</maml:para>
      <maml:para>During The Insert The Values In Properties From The Input Objects That Correspond To Columns In The Destination Table Will Be Inserted In The Corresponding Columns. The Values In Input Object Properties That Do Not Correspond To A Column In The Destination Table Will Be Ignored. The Columns In The Destination Table With No Matching Properties In The Input Objects Will Have Value NULL.</maml:para>
      <maml:para>When All Input Objects Are Processed And There Are No Errors The Transaction Is Committed. During The Processing, The Destination Table Is Locked. At The End The CmdLet Reverts In The Output PowerShell Stream An Integer That Indicates The Number Of Affected Rows.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: UsrPass -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlObjectInsert</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputObject -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="named">
          <maml:name>InputObject</maml:name>
          <maml:description>
            <maml:para>Specifies A Collection Of Input Objects To Be Inserted Into The DataBase Table.</maml:para>
            <maml:para>Input Object Property Values Must Be Struct Or String.</maml:para>
            <maml:para>Input Object Property Values Must Not Be Collections Or Other Objects.</maml:para>
            <maml:para>Input Object Property Names Must Meet The Syntax Requirements For SQL Variables.</maml:para>
            <maml:para>Input Object Property Names Must Match The Destination Table Column Names.</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: Password -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
          <maml:name>Password</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</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>
        <!-- Parameter: Table -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DataBaseTable">
          <maml:name>Table</maml:name>
          <maml:description>
            <maml:para>Specifies A Table Where The Data Will Be Inserted.</maml:para>
            <maml:para>The Table Must Exist Inside The Specified DataBase, The CmdLet Won't Create It.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: UserName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
          <maml:name>UserName</maml:name>
          <maml:description>
            <maml:para>Specifies A UserName In Clear Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConflictClause -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConflictClause</maml:name>
          <maml:description>
            <maml:para>Specifies A Conflict Clause To Use In Case A Conflict Occurs During Insert.</maml:para>
            <maml:para></maml:para>
            <maml:para>Accepted Values: "Fail", "Ignore" And "Update". Default Value "Fail".</maml:para>
            <maml:para></maml:para>
            <maml:para>When The Destination Table Have Autoincrement Column, Use The Default Value To Avoid Unexpected Results.</maml:para>
            <maml:para></maml:para>
            <maml:para>Using This Parameter Allows The CmdLet To Finish The Insert Without Errors Related With Primary Key Uniqueness Violation. This Is Possible With Additional Verifications.</maml:para>
            <maml:para></maml:para>
            <maml:para>Whenever The Destination Table Have No Primary Key Column The CmdLet Will Ignore The Value Specified In The Parameter And Will Use "Fail" Option. The User Will Be Notified With Warning.</maml:para>
            <maml:para>The Uniqueness Of The Inserted Entries Is Not Verified On The Properties / Columns Which Are Not Primary Key. Whenever The Destination Table Have Unique Constraints On Not Primary Key Columns And That Uniqueness Is Violated, The CmdLet Reverts SQL Error And The Destination Table Is Reverted Back To Its Original State.</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para>"Fail" - This Is The Default Value. The CmdLet Does Not Make Any Additional Verifications. In Case Primary Key Uniqueness Violation Occur The CmdLet Will Revert SQL Error. The Destination Table Is Reverted To Its State Prior The CmdLet Execution.</maml:para>
            <maml:para>"Ignore" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Does Not Exists. Then It Inserts The New Entry. In Case The Entry Already Exists It Remain Intact And, New Entry Is Inserted. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para>IF NOT EXISTS</maml:para>
            <maml:para>(SELECT [Col1] FROM [&lt;Table&gt;] WHERE [Col1] = @Var1)</maml:para>
            <maml:para>BEGIN</maml:para>
            <maml:para>INSERT INTO [&lt;Table&gt;]</maml:para>
            <maml:para>([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES (@Var1, @Var2, ... @VarX)</maml:para>
            <maml:para>END</maml:para>
            <maml:para></maml:para>
            <maml:para>"Update" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Exists. Then Either Inserts A New Entry Or Updates The Existing Entry. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para></maml:para>
            <maml:para>MERGE INTO [&lt;Table&gt;] AS [target]</maml:para>
            <maml:para>USING (SELECT @Var1 AS [Col1], @Var2 AS [Col2] ... @VarX AS [ColX]) AS [source]</maml:para>
            <maml:para>ON [source].[Col1] = [target].[Col1]</maml:para>
            <maml:para>WHEN MATCHED THEN</maml:para>
            <maml:para>UPDATE SET [Col2] = [source].[Col2] ... [ColX] = [source].[ColX]</maml:para>
            <maml:para>WHEN NOT MATCHED THEN</maml:para>
            <maml:para>INSERT ([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES ([source].[Col1], [source].[Col2], ... [source].[ColX]);</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Fail</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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:syntaxItem>
      <!-- Parameter set: Cred -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlObjectInsert</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Credentials -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
          <maml:name>Credentials</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          </maml:description>
          <command:parameterValue required="true">PSCredential</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.PSCredential</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputObject -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="named">
          <maml:name>InputObject</maml:name>
          <maml:description>
            <maml:para>Specifies A Collection Of Input Objects To Be Inserted Into The DataBase Table.</maml:para>
            <maml:para>Input Object Property Values Must Be Struct Or String.</maml:para>
            <maml:para>Input Object Property Values Must Not Be Collections Or Other Objects.</maml:para>
            <maml:para>Input Object Property Names Must Meet The Syntax Requirements For SQL Variables.</maml:para>
            <maml:para>Input Object Property Names Must Match The Destination Table Column Names.</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: Table -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DataBaseTable">
          <maml:name>Table</maml:name>
          <maml:description>
            <maml:para>Specifies A Table Where The Data Will Be Inserted.</maml:para>
            <maml:para>The Table Must Exist Inside The Specified DataBase, The CmdLet Won't Create It.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConflictClause -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConflictClause</maml:name>
          <maml:description>
            <maml:para>Specifies A Conflict Clause To Use In Case A Conflict Occurs During Insert.</maml:para>
            <maml:para></maml:para>
            <maml:para>Accepted Values: "Fail", "Ignore" And "Update". Default Value "Fail".</maml:para>
            <maml:para></maml:para>
            <maml:para>When The Destination Table Have Autoincrement Column, Use The Default Value To Avoid Unexpected Results.</maml:para>
            <maml:para></maml:para>
            <maml:para>Using This Parameter Allows The CmdLet To Finish The Insert Without Errors Related With Primary Key Uniqueness Violation. This Is Possible With Additional Verifications.</maml:para>
            <maml:para></maml:para>
            <maml:para>Whenever The Destination Table Have No Primary Key Column The CmdLet Will Ignore The Value Specified In The Parameter And Will Use "Fail" Option. The User Will Be Notified With Warning.</maml:para>
            <maml:para>The Uniqueness Of The Inserted Entries Is Not Verified On The Properties / Columns Which Are Not Primary Key. Whenever The Destination Table Have Unique Constraints On Not Primary Key Columns And That Uniqueness Is Violated, The CmdLet Reverts SQL Error And The Destination Table Is Reverted Back To Its Original State.</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para>"Fail" - This Is The Default Value. The CmdLet Does Not Make Any Additional Verifications. In Case Primary Key Uniqueness Violation Occur The CmdLet Will Revert SQL Error. The Destination Table Is Reverted To Its State Prior The CmdLet Execution.</maml:para>
            <maml:para>"Ignore" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Does Not Exists. Then It Inserts The New Entry. In Case The Entry Already Exists It Remain Intact And, New Entry Is Inserted. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para>IF NOT EXISTS</maml:para>
            <maml:para>(SELECT [Col1] FROM [&lt;Table&gt;] WHERE [Col1] = @Var1)</maml:para>
            <maml:para>BEGIN</maml:para>
            <maml:para>INSERT INTO [&lt;Table&gt;]</maml:para>
            <maml:para>([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES (@Var1, @Var2, ... @VarX)</maml:para>
            <maml:para>END</maml:para>
            <maml:para></maml:para>
            <maml:para>"Update" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Exists. Then Either Inserts A New Entry Or Updates The Existing Entry. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para></maml:para>
            <maml:para>MERGE INTO [&lt;Table&gt;] AS [target]</maml:para>
            <maml:para>USING (SELECT @Var1 AS [Col1], @Var2 AS [Col2] ... @VarX AS [ColX]) AS [source]</maml:para>
            <maml:para>ON [source].[Col1] = [target].[Col1]</maml:para>
            <maml:para>WHEN MATCHED THEN</maml:para>
            <maml:para>UPDATE SET [Col2] = [source].[Col2] ... [ColX] = [source].[ColX]</maml:para>
            <maml:para>WHEN NOT MATCHED THEN</maml:para>
            <maml:para>INSERT ([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES ([source].[Col1], [source].[Col2], ... [source].[ColX]);</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Fail</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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:syntaxItem>
      <!-- Parameter set: LogOnSession -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlObjectInsert</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputObject -->
        <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="named">
          <maml:name>InputObject</maml:name>
          <maml:description>
            <maml:para>Specifies A Collection Of Input Objects To Be Inserted Into The DataBase Table.</maml:para>
            <maml:para>Input Object Property Values Must Be Struct Or String.</maml:para>
            <maml:para>Input Object Property Values Must Not Be Collections Or Other Objects.</maml:para>
            <maml:para>Input Object Property Names Must Meet The Syntax Requirements For SQL Variables.</maml:para>
            <maml:para>Input Object Property Names Must Match The Destination Table Column Names.</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: Table -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DataBaseTable">
          <maml:name>Table</maml:name>
          <maml:description>
            <maml:para>Specifies A Table Where The Data Will Be Inserted.</maml:para>
            <maml:para>The Table Must Exist Inside The Specified DataBase, The CmdLet Won't Create It.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: ConflictClause -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>ConflictClause</maml:name>
          <maml:description>
            <maml:para>Specifies A Conflict Clause To Use In Case A Conflict Occurs During Insert.</maml:para>
            <maml:para></maml:para>
            <maml:para>Accepted Values: "Fail", "Ignore" And "Update". Default Value "Fail".</maml:para>
            <maml:para></maml:para>
            <maml:para>When The Destination Table Have Autoincrement Column, Use The Default Value To Avoid Unexpected Results.</maml:para>
            <maml:para></maml:para>
            <maml:para>Using This Parameter Allows The CmdLet To Finish The Insert Without Errors Related With Primary Key Uniqueness Violation. This Is Possible With Additional Verifications.</maml:para>
            <maml:para></maml:para>
            <maml:para>Whenever The Destination Table Have No Primary Key Column The CmdLet Will Ignore The Value Specified In The Parameter And Will Use "Fail" Option. The User Will Be Notified With Warning.</maml:para>
            <maml:para>The Uniqueness Of The Inserted Entries Is Not Verified On The Properties / Columns Which Are Not Primary Key. Whenever The Destination Table Have Unique Constraints On Not Primary Key Columns And That Uniqueness Is Violated, The CmdLet Reverts SQL Error And The Destination Table Is Reverted Back To Its Original State.</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para>"Fail" - This Is The Default Value. The CmdLet Does Not Make Any Additional Verifications. In Case Primary Key Uniqueness Violation Occur The CmdLet Will Revert SQL Error. The Destination Table Is Reverted To Its State Prior The CmdLet Execution.</maml:para>
            <maml:para>"Ignore" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Does Not Exists. Then It Inserts The New Entry. In Case The Entry Already Exists It Remain Intact And, New Entry Is Inserted. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para>IF NOT EXISTS</maml:para>
            <maml:para>(SELECT [Col1] FROM [&lt;Table&gt;] WHERE [Col1] = @Var1)</maml:para>
            <maml:para>BEGIN</maml:para>
            <maml:para>INSERT INTO [&lt;Table&gt;]</maml:para>
            <maml:para>([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES (@Var1, @Var2, ... @VarX)</maml:para>
            <maml:para>END</maml:para>
            <maml:para></maml:para>
            <maml:para>"Update" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Exists. Then Either Inserts A New Entry Or Updates The Existing Entry. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
            <maml:para></maml:para>
            <maml:para>MERGE INTO [&lt;Table&gt;] AS [target]</maml:para>
            <maml:para>USING (SELECT @Var1 AS [Col1], @Var2 AS [Col2] ... @VarX AS [ColX]) AS [source]</maml:para>
            <maml:para>ON [source].[Col1] = [target].[Col1]</maml:para>
            <maml:para>WHEN MATCHED THEN</maml:para>
            <maml:para>UPDATE SET [Col2] = [source].[Col2] ... [ColX] = [source].[ColX]</maml:para>
            <maml:para>WHEN NOT MATCHED THEN</maml:para>
            <maml:para>INSERT ([Col1], [Col2], ... [ColX])</maml:para>
            <maml:para>VALUES ([source].[Col1], [source].[Col2], ... [source].[ColX]);</maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>Fail</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: UseCurrentLogOnSession -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>UseCurrentLogOnSession</maml:name>
          <maml:description>
            <maml:para>Specifies That Current User LogOnSession Will Be Used For The SQL Connection</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>True</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: Computer -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>Computer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>ComputerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>SqlServer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>SqlServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>DbServer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>DbServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>Server</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>ServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: DatabaseName -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DatabaseName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DbName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DataBase</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDatabaseName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDbName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDb</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: UserName -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>UserName</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>SqlUser</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>Usr</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>UID</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>DbUser</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Password -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>Password</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</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="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>SqlPassword</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>DbPassword</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>pwd</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>Pass</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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>
      <!-- Parameter: Credentials -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>Credentials</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>SqlCredentials</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>SqlCred</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>Cred</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: UseCurrentLogOnSession -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>UseCurrentLogOnSession</maml:name>
        <maml:description>
          <maml:para>Specifies That Current User LogOnSession Will Be Used For The SQL Connection</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>True</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Table -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DataBaseTable">
        <maml:name>Table</maml:name>
        <maml:description>
          <maml:para>Specifies A Table Where The Data Will Be Inserted.</maml:para>
          <maml:para>The Table Must Exist Inside The Specified DataBase, The CmdLet Won't Create It.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DataBaseTable">
        <maml:name>DataBaseTable</maml:name>
        <maml:description>
          <maml:para>Specifies A Table Where The Data Will Be Inserted.</maml:para>
          <maml:para>The Table Must Exist Inside The Specified DataBase, The CmdLet Won't Create It.</maml:para>
          <maml:para>This is an alias of the Table parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: InputObject -->
      <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="named">
        <maml:name>InputObject</maml:name>
        <maml:description>
          <maml:para>Specifies A Collection Of Input Objects To Be Inserted Into The DataBase Table.</maml:para>
          <maml:para>Input Object Property Values Must Be Struct Or String.</maml:para>
          <maml:para>Input Object Property Values Must Not Be Collections Or Other Objects.</maml:para>
          <maml:para>Input Object Property Names Must Meet The Syntax Requirements For SQL Variables.</maml:para>
          <maml:para>Input Object Property Names Must Match The Destination Table Column Names.</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: ConflictClause -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>ConflictClause</maml:name>
        <maml:description>
          <maml:para>Specifies A Conflict Clause To Use In Case A Conflict Occurs During Insert.</maml:para>
          <maml:para></maml:para>
          <maml:para>Accepted Values: "Fail", "Ignore" And "Update". Default Value "Fail".</maml:para>
          <maml:para></maml:para>
          <maml:para>When The Destination Table Have Autoincrement Column, Use The Default Value To Avoid Unexpected Results.</maml:para>
          <maml:para></maml:para>
          <maml:para>Using This Parameter Allows The CmdLet To Finish The Insert Without Errors Related With Primary Key Uniqueness Violation. This Is Possible With Additional Verifications.</maml:para>
          <maml:para></maml:para>
          <maml:para>Whenever The Destination Table Have No Primary Key Column The CmdLet Will Ignore The Value Specified In The Parameter And Will Use "Fail" Option. The User Will Be Notified With Warning.</maml:para>
          <maml:para>The Uniqueness Of The Inserted Entries Is Not Verified On The Properties / Columns Which Are Not Primary Key. Whenever The Destination Table Have Unique Constraints On Not Primary Key Columns And That Uniqueness Is Violated, The CmdLet Reverts SQL Error And The Destination Table Is Reverted Back To Its Original State.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>"Fail" - This Is The Default Value. The CmdLet Does Not Make Any Additional Verifications. In Case Primary Key Uniqueness Violation Occur The CmdLet Will Revert SQL Error. The Destination Table Is Reverted To Its State Prior The CmdLet Execution.</maml:para>
          <maml:para>"Ignore" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Does Not Exists. Then It Inserts The New Entry. In Case The Entry Already Exists It Remain Intact And, New Entry Is Inserted. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
          <maml:para>IF NOT EXISTS</maml:para>
          <maml:para>(SELECT [Col1] FROM [&lt;Table&gt;] WHERE [Col1] = @Var1)</maml:para>
          <maml:para>BEGIN</maml:para>
          <maml:para>INSERT INTO [&lt;Table&gt;]</maml:para>
          <maml:para>([Col1], [Col2], ... [ColX])</maml:para>
          <maml:para>VALUES (@Var1, @Var2, ... @VarX)</maml:para>
          <maml:para>END</maml:para>
          <maml:para></maml:para>
          <maml:para>"Update" - The CmdLet Verifies Whether An Entry With The Value In The Primary Key Column Exists. Then Either Inserts A New Entry Or Updates The Existing Entry. Whenever That Option Is Used The Generated SQL Query Will Look Like, Assuming "Col1" Is Primary Key:</maml:para>
          <maml:para></maml:para>
          <maml:para>MERGE INTO [&lt;Table&gt;] AS [target]</maml:para>
          <maml:para>USING (SELECT @Var1 AS [Col1], @Var2 AS [Col2] ... @VarX AS [ColX]) AS [source]</maml:para>
          <maml:para>ON [source].[Col1] = [target].[Col1]</maml:para>
          <maml:para>WHEN MATCHED THEN</maml:para>
          <maml:para>UPDATE SET [Col2] = [source].[Col2] ... [ColX] = [source].[ColX]</maml:para>
          <maml:para>WHEN NOT MATCHED THEN</maml:para>
          <maml:para>INSERT ([Col1], [Col2], ... [ColX])</maml:para>
          <maml:para>VALUES ([source].[Col1], [source].[Col2], ... [source].[ColX]);</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>Fail</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: QueryTimeout -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
        <maml:name>QueryTimeout</maml:name>
        <maml:description>
          <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
          <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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="TimeOut">
        <maml:name>TimeOut</maml:name>
        <maml:description>
          <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
          <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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>
    </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 Collection Of Input Objects To Be Inserted Into The DataBase Table.</maml:para>
          <maml:para>Input Object Property Values Must Be Struct Or String.</maml:para>
          <maml:para>Input Object Property Values Must Not Be Collections Or Other Objects.</maml:para>
          <maml:para>Input Object Property Names Must Meet The Syntax Requirements For SQL Variables.</maml:para>
          <maml:para>Input Object Property Names Must Match The Destination Table Column Names.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <!-- OutputType: Int32 -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Int32</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:title></maml:title>
      <maml:alert>
        <maml:para>AUTHOR: Svetoslav Nedyalkov Savov</maml:para>
        <maml:para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</maml:para>
        <maml:para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</maml:para>
        <maml:para></maml:para>
        <maml:para></maml:para>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <dev:code>[System.Int32]$intRows = Invoke-SnsMsSqlObjectInsert -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" `
-Table "AdAccounts" -InputObject $arrAccounts -ConflictClause "Update" -UserName "John.Smith" -Password "Pa$$w0rd";</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para>Converts The Specified InputObjects Collection To SQL Parameters And Insert The Data Into "AdAccounts" Table. In Case The Table Already Contains Data The Existing Entries Will Be Updated.</maml:para>
          <maml:para></maml:para>
          <maml:para>The CmdLet Connects To The Specified DataBase And Instance Using UserName And Password Specified In Clear Text. Of Course The Example Values Above Are Fake.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 2 ----------</maml:title>
        <dev:code>$objCred = Get-Credential;
[System.Int32]$intRows = $arrAccounts | Invoke-SnsMsSqlObjectInsert -Computer "DB01.contoso.com\Test" `
-DatabaseName "TestDB" -Table "AdAccounts" -ConflictClause "Ignore" -Credentials $objCred;</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para>Converts The Pipelined InputObjects Collection To SQL Parameters And Insert The Data Into AdAccounts Table. In Case There Are Entries That Conflicts With Existing Table Entries The CmdLet Will Ignore The Specific Objects Coming From The Pipeline And Will Complete The Transaction If There Are No Other SQL Errors.</maml:para>
          <maml:para></maml:para>
          <maml:para>The CmdLet Connects To The Specified DataBase And Instance Using The Credential Object Generated On The First Line.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 3 ----------</maml:title>
        <dev:code>[System.Int32]$intRows = $arrAccounts | Invoke-SnsMsSqlObjectInsert -Computer "DB01.contoso.com\Test" `
-DatabaseName "TestDB" -Table "AdAccounts" -ConflictClause "Ignore" -UseCurrentLogOnSession;</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para>In This Example The CmdLet Connects To The Specified DataBase And Instance Using The Currently Logged On User Security Context. From DataBase Perspective On This Example Is Done Exactly The Same As On The Previous Example.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText> svesavov / SnsMsSqlPsModule - </maml:linkText>
        <maml:uri>https://github.com/svesavov/SnsMsSqlPsModule</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> PowerShell Gallery - </maml:linkText>
        <maml:uri>https://www.powershellgallery.com/packages/SnsMsSqlPsModule/</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> Svetoslav Savov on LinkedIn - </maml:linkText>
        <maml:uri>https://www.linkedin.com/in/svetoslavsavov</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Server Download - </maml:linkText>
        <maml:uri>https://www.microsoft.com/en-us/sql-server/sql-server-downloads</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Data Types - </maml:linkText>
        <maml:uri>https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Supported SQL Syntax - </maml:linkText>
        <maml:uri>https://docs.microsoft.com/en-us/sql/t-sql/language-reference</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Tutorials - </maml:linkText>
        <maml:uri>https://www.sqlservertutorial.net/</maml:uri>
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>
  <!-- Cmdlet: Invoke-SnsMsSqlQuery -->
  <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-SnsMsSqlQuery</command:name>
      <command:verb>Invoke</command:verb>
      <command:noun>SnsMsSqlQuery</command:noun>
      <maml:description>
        <maml:para>This Cmdlet Connects To A Specified MS Transactional SQL DataBase, Executes SQL Query / Queries Against The DataBase, Reverts The Output In A Collection Of Specified DataType And Closes The SQL Session.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>This Cmdlet Connects To A Specified MS Transactional SQL DataBase, Executes SQL Query / Queries Against The DataBase, Reverts The Output In A Collection Of Specified DataType And Closes The SQL Session.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>The CmdLet Is Based On My Previous Work Related With SQLite Serverless DataBase:</maml:para>
      <maml:para>https://github.com/svesavov/SnsSqlitePsModule</maml:para>
      <maml:para>https://www.powershellgallery.com/packages/SnsSqlitePsModule</maml:para>
      <maml:para>Working With SQLite Is Nice And Free, It Is Good Tool For Learning SQL. Also It Is Fine To Be Used Within Automations And Scripts To Keep Temporary Data Or Configuration Data (If The Machine That Hosts The Automation Have Fast Hard Disks), However Where It Comes To Large Volumes Of Data Accessed By Different Automations Or Scripts Arises The Need Of Some More Powerful Server / Service Based DataBase Which Is Optimized For Large Volumes Of Data, And Can Handle The DataBase Locks Better.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>The CmdLet Have Six Parameter Sets Which Represent The Allowed Combination Of Input Parameters.</maml:para>
      <maml:para>Like The Original CmdLet The Input Is Validated At The Beginning Within The Parameter Definitions. For That Purpose, Additional Validation Attributes Were Developed, Because "[ValidateScript({})]" Validation Attribute Is Not Supported In C#.</maml:para>
      <maml:para>The CmdLet Connects To The Specified MS SQL Server Instance And Specified DataBase By Itself. There Is No Requirement SqlConnection To Be Established In Advance. In The Begin Method The CmdLet Evaluate The Provided Input, Imports Any .SQL Files If Such Are Provided With A Parameter, Connects To The MS SQL DataBase And Verifies The Connection Via Running A SQL Query That Reverts The DataBase System Time.</maml:para>
      <maml:para>Whenever The SQL Query Which Needs To Be Run Against The DataBase Is Too Complex Can Be Used SQL Query Input File. The CmdLet Does Allow Usage Of SQL Query File With Standard ".sql" Extension With Specifying Of SQL Parameters As HashTable, However It Does Not Support Usage Of Multiple ".sql" Files At Once. It Still Can Be Used To Import Single SQL Query And Using Of Collection Of SQL Parameter Dictionaries To Insert Multiple Rows At Once. The ".sql" File Read Happens In Begin Method, Which Exclude The Possibility To Execute Multiple SQL Queries At Once. I Don't Want File Operations In Process Method Because Of Performance Considerations.</maml:para>
      <maml:para>Usage Of ".sql" Files To Keep The SQL Queries Out Of The Main Code Might Sound Like Heresy For The Normal Developers, Because The Queries Are Kept There In Clear Text And Can Be Modified By The User, Not To Forget About Possible Leak Of Proprietary Information. However This Is A PowerShell Module Which Means That It Will Be Used In Scripts And Automation On ".ps1" Files Which Are Clear Text As Well And The Users Have Access To The Code Inside. Therefore We Might Use The Opportunity To Have The Complex SQL Queries On Separate Files. Which Leads To The Conveniency Of Not Modifying Them Whenever The Next Version Is Released Or Modify Only Them Whenever Something On The DataBase Is Changed.</maml:para>
      <maml:para>Because The Connection Is Established In The Begin Method It Is Done Once And All The Specified Queries Are Sent At Once In The Process Method Which Gain Huge Performance Boost.</maml:para>
      <maml:para>To Boost The Performance Even Further, The CmdLet Will Execute All The Specified SQL Queries Or Single Query With Multiple Parameters Using Single SQL Transaction. The Using Of Transactions Happens After Evaluation Of The Specified SQL Query. Whenever The Query Contains The Keyword "COMMIT" Would Mean That The Transactions Are Managed Within The Query And The Transactions Functionality Of The CmdLet Is Always Disabled. In Order The CmdLet To Use The Transaction Functionality The SQL Query Must Contains Either "INSERT" Or "UPDATE" Keywords, And The Transactions Must Not Be Managed Within The Query Itself. It Is Always Preferable The User To Manage The Transactions Within The SQL Query, In That Way Not Leaving Any Chance Of The CmdLet Making Wrong Decisions.</maml:para>
      <maml:para>The CmdLet Support Only Authenticated Connection The MS SQL Server Instance. There Are Three Possible Ways This To Be Achieved:</maml:para>
      <maml:para>- Using The Windows Authentication - The CmdLet Uses The Windows Single Sign On To Connect To The DataBase Server Instance As The Currently Logged On User. It Is Preferable For Scripts Executed In Interactive Mode Which Eliminates The Need Of Additional Logon Steps. Whenever The Script Or The Automation Are Executed Unattended On Schedule As A Service This Might Lead To Unexpected Behavior. In Those Cases Is Preferable To Be Used Some Of The Next Authentication Options. Using This Option Can Be Authenticated Only Domain Or Windows Local Accounts.</maml:para>
      <maml:para></maml:para>
      <maml:para>- Via Specifying UserName And Password In Clear Text - In This Way, The UserName And The Password Are Included In The SQL Connection String, That Way Send Over The Network. In This Way, The User Relies Only On The Encryption Of The SQL Connection. Using This Method Impersonation Of The User That Connects To The DataBase Is Possible. Which Does Allow The Automations To Be Run With One Service Account And The DataBase Connection To Be Established With Different Service Account. Using This Option Can Be Authenticated Either Domain Or Windows Local Accounts Or SQL Users.</maml:para>
      <maml:para>- Via Specifying [System.Management.Automation.PSCredential] Object. In This Way, The Password Is Not Kept In Clear Text. This Is Considered As More Secure. The Authentication Happens In The Same Way As The Windows Authenticates The Users. Therefore The Password Cannot Be Intercepted During The Authentication Even If The SQL Connection Encryption Is Already Breached. Using This Method Impersonation Of The User That Connects To The DataBase Is Possible. Which Does Allow The Automations To Be Run With One Service Account And The DataBase Connection To Be Established With Different Service Account. Using This Option Can Be Authenticated Only SQL Users.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>The CmdLet Parameters And Pipeline Were Designed, Based On The Experience Gained On My Previous Work Related With SQLite And The Purpose Of This Module, Preserving The Parameter Names And Aliases And The Pipeline Functionalities Whenever It Is Possible. Design Decisions Related With The Pipeline Are Always Based On Compromises. Having In Mind The Usage Of The SQLite Module It Makes More Sense To Design The Pipeline In A Way, To Allow Running Multiple Queries Or Single Query With Multiple Sets Of SQL Parameters Against A Single DataBase, Rather Than Running Single Query With Single SQL Parameter Set Against Multiple DataBases. If I Ever Need High Availability On My Automations Would Prefer To Schedule Them To Run On A Virtual Machine Which Is A Resource On ESX Or Other Virtualization Platform Which Allows The Virtual Machine To Be Replicated And Powered On Different Hosts, Rather Than Writing A Script Capable To Jump From One Machine To Another And Maintaining The Same Information In Multiple DataBases.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para>With The Current Parameters And Pipeline Design The CmdLet Can:</maml:para>
      <maml:para></maml:para>
      <maml:para>- Single SQL Query Without Any SQL Parameters. The SQL Query Can Be Provided Directly To The "Query" Parameter Or As Object Property Matching The Parameter Name Or Parameter Aliases Of An Object Coming From The Pipeline. Although This Is The Easiest Way Of Working With DataBases It Is Not Recommended Because Of SQL Injection High Risk Unless Your SQL Queries Have No Users Input. Even In That Case There Is Still Possibility Of SQL Injection. For Example If You Use Dynamic Enumeration Of Objects Which Have To Be Inserted Into A DataBase And The Name Or Property Of A Dynamically Enumerated Object Have Value That Makes SQL Injection. Let’s Give A Specific Example If You Insert In A Table “ACCOUNTS” The Dynamically Enumerated Via LDAP Query Active Directory Accounts And Someone Created An Account With Name "Robert'); DROP TABLE [ACCOUNTS];--".</maml:para>
      <maml:para>- Single SQL Query And Single SQL Parameters HashTable, Provided Directly To The Corresponding Parameters Or Via The Pipeline. Either The SQL Query And The SQL Parameters HashTable Provided As Properties Of An Object Coming From The Pipeline, Or The SQL Parameters HashTable Coming From The Pipeline And The SQL Query Specified In "Query" Parameter. Whenever SQL Parameters Are Used The Possibility Of SQL Injection Is Completely Eliminated.</maml:para>
      <maml:para>- Single SQL Query And Collection Of SQL Parameters HashTables. In This Case The Parameters Represents Multiple Rows Which Have To Be Inserted Within Single Table. The User Have To Keep In Mind That The SQL Query Must Have SQL Variables For Each Of The Columns And Each HashTable In The Collections Have To Have Keys Corresponding To Each Of The SQL Variables. The SQL Query And Its Corresponding HashTables Collection Can Be Specified Either Directly To The Corresponding Parameters, Or As Properties Of An Object Coming From Pipeline, Or Specifying The Query To The CmdLet "Query" Parameter And The HashTables Collection Coming From The Pipeline.</maml:para>
      <maml:para>The CmdLet Is Still Capable To Work With Collection Of SQL Queries, For That Purpose The Queries And Their Corresponding SQL Parameters HashTable / HashTables If Any, Can Be Provided Only Via Object Properties Of Objects Collection Coming From The Pipeline. Single Object Coming From The Pipeline Cannot Have Multiple SQL Queries.</maml:para>
      <maml:para>The CmdLet Will Not Perform Any Normalization Of The Data Provided In The SQL Parameters Or Directly In The SQL Queries. It Is User Responsibility To Normalize The Data In The Way Which The MS SQL Server To Understand It. For Example All The Dates Must Be Present To The SQL Server As Strings Which Corresponds To The Column Data Type. Sending [System.DateTime] Object To The SQL Server Might Lead To Unexpected Behavior Or Errors. Even Though The Most Appropriate Way To Work With Dates Is To Convert Them To Long And Keep Them In Columns With Data Type BIGINT, But That Is A Personal Choice Simplifying The Developers Life.</maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
      <maml:para></maml:para>
    </maml:description>
    <command:syntax>
      <!-- Parameter set: Qry~UsrPass -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Password -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
          <maml:name>Password</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</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>
        <!-- Parameter: UserName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
          <maml:name>UserName</maml:name>
          <maml:description>
            <maml:para>Specifies A UserName In Clear Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Query -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
          <maml:name>Query</maml:name>
          <maml:description>
            <maml:para>Specifies The SQL Query To Be Run.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: File~UsrPass -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputFile -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
          <maml:name>InputFile</maml:name>
          <maml:description>
            <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
            <maml:para>Works Only With Full Absolute UNC 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>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Password -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
          <maml:name>Password</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</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>
        <!-- Parameter: UserName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
          <maml:name>UserName</maml:name>
          <maml:description>
            <maml:para>Specifies A UserName In Clear Text</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: Qry~Cred -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Credentials -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
          <maml:name>Credentials</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          </maml:description>
          <command:parameterValue required="true">PSCredential</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.PSCredential</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Query -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
          <maml:name>Query</maml:name>
          <maml:description>
            <maml:para>Specifies The SQL Query To Be Run.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: File~Cred -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Credentials -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
          <maml:name>Credentials</maml:name>
          <maml:description>
            <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          </maml:description>
          <command:parameterValue required="true">PSCredential</command:parameterValue>
          <dev:type>
            <maml:name>System.Management.Automation.PSCredential</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputFile -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
          <maml:name>InputFile</maml:name>
          <maml:description>
            <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
            <maml:para>Works Only With Full Absolute UNC 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>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: Qry~LogOnSession -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: Query -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
          <maml:name>Query</maml:name>
          <maml:description>
            <maml:para>Specifies The SQL Query To Be Run.</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: UseCurrentLogOnSession -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>UseCurrentLogOnSession</maml:name>
          <maml:description>
            <maml:para>Specifies That Current User LogOnSession Will Be Used For The SQL Connection</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>True</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <!-- Parameter set: File~LogOnSession -->
      <command:syntaxItem>
        <maml:name>Invoke-SnsMsSqlQuery</maml:name>
        <!-- Parameter: Computer -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
          <maml:name>Computer</maml:name>
          <maml:description>
            <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
            <maml:para>"DataBase Server"</maml:para>
            <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
            <maml:para>"DataBase Server","Port Number"</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: DatabaseName -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
          <maml:name>DatabaseName</maml:name>
          <maml:description>
            <maml:para>Specifies A DataBase Name</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: InputFile -->
        <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
          <maml:name>InputFile</maml:name>
          <maml:description>
            <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
            <maml:para>Works Only With Full Absolute UNC 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>
          <dev:defaultValue></dev:defaultValue>
        </command:parameter>
        <!-- Parameter: As -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>As</maml:name>
          <maml:description>
            <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
            <maml:para>[System.Data.DataSet]</maml:para>
            <maml:para>[System.Data.DataTable]</maml:para>
            <maml:para>[System.Data.DataRow]</maml:para>
            <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
          </maml:description>
          <command:parameterValue required="true">string</command:parameterValue>
          <dev:type>
            <maml:name>System.String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>PSObject</dev:defaultValue>
        </command:parameter>
        <!-- Parameter: QueryTimeout -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
          <maml:name>QueryTimeout</maml:name>
          <maml:description>
            <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
            <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: SqlParameters -->
        <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
          <maml:name>SqlParameters</maml:name>
          <maml:description>
            <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
            <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
            <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
            <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
            <maml:para>Example:</maml:para>
            <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
            <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
          </maml:description>
          <command:parameterValue required="true">IDictionary[]</command:parameterValue>
          <dev:type>
            <maml:name>System.Collections.IDictionary[]</maml:name>
            <maml:uri />
          </dev:type>
        </command:parameter>
        <!-- Parameter: UseCurrentLogOnSession -->
        <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
          <maml:name>UseCurrentLogOnSession</maml:name>
          <maml:description>
            <maml:para>Specifies That Current User LogOnSession Will Be Used For The SQL Connection</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>True</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <!-- Parameter: Computer -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>Computer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>ComputerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>SqlServer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>SqlServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>DbServer</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>DbServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>Server</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="ComputerName,SqlServer,SqlServerName,DbServer,DbServerName,Server,ServerName">
        <maml:name>ServerName</maml:name>
        <maml:description>
          <maml:para>Specifies A MS SQL Server And MS SQL Instance In Format:</maml:para>
          <maml:para>"DataBase Server"</maml:para>
          <maml:para>"DataBase Server"\"DataBase Instance"</maml:para>
          <maml:para>"DataBase Server","Port Number"</maml:para>
          <maml:para>This is an alias of the Computer parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: DatabaseName -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DatabaseName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DbName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>DataBase</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDatabaseName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDbName</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="DbName,DataBase,SqlDatabaseName,SqlDbName,SqlDb">
        <maml:name>SqlDb</maml:name>
        <maml:description>
          <maml:para>Specifies A DataBase Name</maml:para>
          <maml:para>This is an alias of the DatabaseName parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: UserName -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>UserName</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>SqlUser</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>Usr</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>UID</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlUser,User,Usr,UID,DbUser">
        <maml:name>DbUser</maml:name>
        <maml:description>
          <maml:para>Specifies A UserName In Clear Text</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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Password -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>Password</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</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="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>SqlPassword</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>DbPassword</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>pwd</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlPassword,DbPassword,pwd,Pass">
        <maml:name>Pass</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Security.SecureString] Or [System.String] Password To Use In The MS SQL Connection.</maml:para>
          <maml:para>This is an alias of the Password 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>
      <!-- Parameter: Credentials -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>Credentials</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>SqlCredentials</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>SqlCred</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlCredentials,SqlCred,Cred">
        <maml:name>Cred</maml:name>
        <maml:description>
          <maml:para>Specifies A [System.Management.Automation.PSCredential] Object</maml:para>
          <maml:para>This is an alias of the Credentials parameter.</maml:para>
        </maml:description>
        <command:parameterValue required="true">PSCredential</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCredential</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: UseCurrentLogOnSession -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>UseCurrentLogOnSession</maml:name>
        <maml:description>
          <maml:para>Specifies That Current User LogOnSession Will Be Used For The SQL Connection</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>True</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: Query -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
        <maml:name>Query</maml:name>
        <maml:description>
          <maml:para>Specifies The SQL Query To Be Run.</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
        <maml:name>SqlQuery</maml:name>
        <maml:description>
          <maml:para>Specifies The SQL Query To Be Run.</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>
        <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named" aliases="SqlQuery,DbQuery">
        <maml:name>DbQuery</maml:name>
        <maml:description>
          <maml:para>Specifies The SQL Query To Be Run.</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>
        <dev:defaultValue>SELECT [TABLE_NAME] FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_TYPE] = 'BASE TABLE' AND [TABLE_CATALOG] = '&lt;DataBaseName&gt;'</dev:defaultValue>
      </command:parameter>
      <!-- Parameter: SqlParameters -->
      <command:parameter required="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
        <maml:name>SqlParameters</maml:name>
        <maml:description>
          <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
          <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
          <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
          <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
          <maml:para>Example:</maml:para>
          <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
          <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</maml:para>
        </maml:description>
        <command:parameterValue required="true">IDictionary[]</command:parameterValue>
        <dev:type>
          <maml:name>System.Collections.IDictionary[]</maml:name>
          <maml:uri />
        </dev:type>
      </command:parameter>
      <!-- Parameter: InputFile -->
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
        <maml:name>InputFile</maml:name>
        <maml:description>
          <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
          <maml:para>Works Only With Full Absolute UNC 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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
        <maml:name>SqlFile</maml:name>
        <maml:description>
          <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
          <maml:para>Works Only With Full Absolute UNC 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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" globbing="false" pipelineInput="false" position="named" aliases="SqlFile,QueryFile">
        <maml:name>QueryFile</maml:name>
        <maml:description>
          <maml:para>Specifies A ".sql" File To Be Used As Query Input.</maml:para>
          <maml:para>Works Only With Full Absolute UNC 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>
        <dev:defaultValue></dev:defaultValue>
      </command:parameter>
      <!-- Parameter: QueryTimeout -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeOut">
        <maml:name>QueryTimeout</maml:name>
        <maml:description>
          <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
          <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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="TimeOut">
        <maml:name>TimeOut</maml:name>
        <maml:description>
          <maml:para>Sets The Wait Time In Seconds Before Terminating The Attempt To Execute A Command And Generating An Error</maml:para>
          <maml:para>Use 0 For The Default TimeOut Value In .NET And MS SQL Server</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: As -->
      <command:parameter required="false" globbing="false" pipelineInput="false" position="named">
        <maml:name>As</maml:name>
        <maml:description>
          <maml:para>Specifies To The CmdLet To Revert The Output In One Of The Following Types:</maml:para>
          <maml:para>[System.Data.DataSet]</maml:para>
          <maml:para>[System.Data.DataTable]</maml:para>
          <maml:para>[System.Data.DataRow]</maml:para>
          <maml:para>[System.Management.Automation.PSCustomObject]</maml:para>
        </maml:description>
        <command:parameterValue required="true">string</command:parameterValue>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>PSObject</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>Specifies The SQL Query To Be Run.</maml:para>
        </maml:description>
      </command:inputType>
      <command:inputType>
        <dev:type>
          <maml:name>System.Collections.IDictionary[]</maml:name>
          <maml:uri />
        </dev:type>
        <maml:description>
          <maml:para>HashTable Of Parameters For Parameterized SQL Queries.</maml:para>
          <maml:para>The HashTable Keys Must Match The SQL Query Variable Names.</maml:para>
          <maml:para>The Keys Might Be Specified Either With Or Without At (@) Character In Front.</maml:para>
          <maml:para>The CmdLet Will Take Care To Add Them If Missing.</maml:para>
          <maml:para>Example:</maml:para>
          <maml:para>-Query "SELECT * FROM [db].[dbo].[tblServers] WHERE [ServerFqdn] LIKE @Server"</maml:para>
          <maml:para>-SqlParameters @{"@Server" = "Server01.contoso.com"}</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: PSCustomObject -->
      <command:returnValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCustomObject</maml:name>
          <maml:uri />
        </dev:type>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:title></maml:title>
      <maml:alert>
        <maml:para>AUTHOR: Svetoslav Nedyalkov Savov</maml:para>
        <maml:para>THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK</maml:para>
        <maml:para>OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.</maml:para>
        <maml:para></maml:para>
        <maml:para></maml:para>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>---------- EXAMPLE 1 ----------</maml:title>
        <dev:code>$strQry = "SELECT [name], [create_date], [collation_name], [state_desc] FROM [sys].[databases]";
Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DataBase "TestDB" -Query "$($strQry)" `
    -UseCurrentLogOnSession -As "PSCustomObject";</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Initializes A SQL Query String Variable.</maml:para>
          <maml:para>Runs Single Query Against The MS SQL Server Instance About A Collection With The DataBases In It, Using The Currently Logged On User Security Context.</maml:para>
          <maml:para>The DataBase Parameter Is Required Because Of The Initial Catalog Property Of The SqlConnection String And Cannot Be Omitted. The "sys" Value Cannot Be Used.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 2 ----------</maml:title>
        <dev:code>$objCred = Get-Credential;
Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" -Credentials $objCred `
-As "PSCustomObject";</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Asks The User To Specify Credentials And Store Them In Credential Object Variable.</maml:para>
          <maml:para>Runs Single Query Against The MS SQL Server Instance About A Collection With The Tables Within The Specified DataBase, Using PSCredential Object Created In The First Line.</maml:para>
          <maml:para>Because The Default Value Of "Query" Parameter Is The Query Needed To List The Tables, The Parameter Is Omitted.</maml:para>
          <maml:para>The Default Value In Query Parameter Contains &lt;DataBaseName&gt; Keyword, Which Indicates To The CmdLet To Replace It With The Value Specified In "DatabaseName" Parameter.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 3 ----------</maml:title>
        <dev:code>$strQry = "SELECT * FROM [&lt;DataBaseName&gt;].[INFORMATION_SCHEMA].[COLUMNS] WHERE ";
$strQry += "[TABLE_CATALOG] = '&lt;DataBaseName&gt;' AND [TABLE_SCHEMA] = 'dbo' AND [TABLE_NAME] = @Table";
@{ "Table" = "TestTable"; } | Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" `
    -Query "$($strQry)" -UserName "John.Smith" -Password "Pa$$w0rd" -As "PSCustomObject";</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Initializes A SQL Query String Variable, About Select All Columns From Specified Table Within The Specified Database.</maml:para>
          <maml:para>The SQL Query Contains &lt;DataBaseName&gt; Keyword, Which Indicates To The CmdLet To Replace It With The Value Specified In "DatabaseName" Parameter.</maml:para>
          <maml:para>Runs A Single Query Specified In The Previous Line, Against The Specified MS SQL Server Instance, Using UserName And Password Specified In Clear Text. Of Course The UserName And The Password In The Example Are Fake.</maml:para>
          <maml:para>The Table Is Specified As SQL Parameter Sent In A Form Of HashTable Via Pipeline Using "ValueFromPipeline".</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 4 ----------</maml:title>
        <dev:code>$strQry = "INSERT INTO [&lt;DataBaseName&gt;].[dbo].[Events] ([ID], [Message], [Severity], [Date])";
$strQry += " VALUES (@ID, @Message, @Severity, @Date)";
Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" -UseCurrentLogOnSession `
    -Query "$($strQry)" -SqlParameters `
    @{
        "@ID" = 1;
        "@Message" = "Some Dummy Message";
        "Severity" = "Error";
        "Date" = [System.DateTime]::Now.ToFileTime();
    };</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Initializes "INSERT" Query Against The Specified Table In The Specified DataBase.</maml:para>
          <maml:para>Runs Single Query Against The Specified DataBase In The Specified MS SQL Server Instance, Using The Currently Logged On User Security Context.</maml:para>
          <maml:para>In The SQL Parameters Keys Are Used Both Strings With And Without At (@) Character. The Keys Match Exactly The SQL Query Variables. Please Note That There Are SQL Variables For Each Of The Columns.</maml:para>
          <maml:para></maml:para>
          <maml:para>The "DateTime" Is Converted To "Long" And Inserted In A Column With Data Type "BIGINT". Using Long Integer To Store The Dates Gives As Certain Benefits, Like No Need To Keep Track Of The Time Zones, No Need To Keep Track Of The Daylight Saving Start And End Date And Whether It Is Applied To The Date. No Dependency From The Culture Set On The Computer Which Is Running The CmdLet And The Culture Set On The SQL Server. Additionally There Is No Lost In The Value Precision And No Rounding's. Reverse From "Long" To "DateTime" Object Is Just As Easy As The Conversion From "DateTime" To "Long".</maml:para>
          <maml:para>[System.DateTime]::FromFileTime(108666144000000000) - Converts The Long Integer To Local DateTime With Time Zone And Daylight Saving Taken Into Consideration.</maml:para>
          <maml:para>[System.DateTime]::FromFileTimeUtc(108666144000000000) - Converts The Long Integer To Universal DateTime. (Guess What Is The Date From The Example).</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 5 ----------</maml:title>
        <dev:code>Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" -UseCurrentLogOnSession `
    -Query "INSERT INTO [&lt;DataBaseName&gt;].[dbo].[Computers] ([ID], [HostName]) VALUES (@ID, @HostName)" `
    -SqlParameters `
    @(
        @{"@ID" = 1; "HostName" = "Computer1.contoso.com"; };
        @{"@ID" = 2; "HostName" = "Computer2.contoso.com"; };
    );</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Runs Single "INSERT" Query Against The Specified Table In The Specified DataBase In The Specified MS SQL Server Instance With Multiple SQL Parameters HashTables Using The Currently Logged On User Security Context. Because There Are Two HashTables In The SQL Parameters Collection This Creates Two Rows / Entries In The Destination Table. This Is Very Useful Whenever Large Amount Of Data Have To Be Inserted Into The DataBase.</maml:para>
          <maml:para>In The SQL Parameters Keys Are Used Both Strings With And Without At (@) Character. The Keys Match Exactly The SQL Query Variables. Please Note That There Are SQL Variables For Each Of The Columns.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- EXAMPLE 6 ----------</maml:title>
        <dev:code>[System.Object[]]$arrInput = @();
 
[System.Object]$objObject = New-Object -TypeName "System.Object";
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "ID" -Value 1;
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "Event" -Value "Warning";
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "Date" -Value([System.DateTime]::Now.ToFileTime());
[System.Object[]]$arrInput += $objObject;
 
[System.Object]$objObject = New-Object -TypeName "System.Object";
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "ID" -Value 2;
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "Event" -Value "Error";
$objObject | Add-Member -Force -MemberType "NoteProperty" -Name "Date" -Value([System.DateTime]::Now.ToFileTime());
[System.Object[]]$arrInput += $objObject;
 
[SnsMsSqlPsModule.PsObjectToHashTbl]::ToHashTbl($($arrInput | Select-Object *)) | `
    Invoke-SnsMsSqlQuery -Computer "DB01.contoso.com\Test" -DatabaseName "TestDB" -UseCurrentLogOnSession `
    -Query "INSERT INTO [&lt;DataBaseName&gt;].[dbo].[Events] ([ID], [Event], [Date]) VALUES (@ID, @Event, @Date)";</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para>Initializes A Collection With Custom Objects Which Are Not As Easily Converted To HashTables As The "PSCustomObject".</maml:para>
          <maml:para>Converts The Custom Objects From The Previous Line To HashTable Collection And Send It To The Pipeline. For That Purpose We Are Using A .NET Method Made Publicly Available Which Is Present In The Current PowerShell Module.</maml:para>
          <maml:para>Runs Single "INSERT" Query Against The Specified Table In The Specified DataBase In The Specified MS SQL Server Instance With Multiple SQL Parameters HashTables Coming From The Pipeline Using The Currently Logged On User Security Context. Because There Are Two HashTables In The SQL Parameters Collection This Creates Two Rows / Entries In The Destination Table.</maml:para>
          <maml:para>This Is Useful Whenever We Need To Perform Bulk Inserts Or Updates In A Single Transaction Of Large Amount Of Data, Coming On A Collection Of All Kinds Of Classes, Including Imported From A File Using Import-Csv CmdLet. The Example Uses A Collection With Just Two Objects For Readability.</maml:para>
          <maml:para>In Order The Bulk Operations To Work Smoothly And To Avoid Errors:</maml:para>
          <maml:para>- The Input Objects Property Names Must Match Exactly The SQL Variable Names In The SQL Query.</maml:para>
          <maml:para>- The Input Objects Property Value Types Must Match Exactly The Corresponding Columns Data Types.</maml:para>
          <maml:para>- Any Input Object Property Values Must Be Normalized In Advance.</maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText> svesavov / SnsMsSqlPsModule - </maml:linkText>
        <maml:uri>https://github.com/svesavov/SnsMsSqlPsModule</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> PowerShell Gallery - </maml:linkText>
        <maml:uri>https://www.powershellgallery.com/packages/SnsMsSqlPsModule/</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> Svetoslav Savov on LinkedIn - </maml:linkText>
        <maml:uri>https://www.linkedin.com/in/svetoslavsavov</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Server Download - </maml:linkText>
        <maml:uri>https://www.microsoft.com/en-us/sql-server/sql-server-downloads</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Data Types - </maml:linkText>
        <maml:uri>https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-types-transact-sql</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Supported SQL Syntax - </maml:linkText>
        <maml:uri>https://docs.microsoft.com/en-us/sql/t-sql/language-reference</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText> MS SQL Tutorials - </maml:linkText>
        <maml:uri>https://www.sqlservertutorial.net/</maml:uri>
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>
</helpItems>