<commit_before>#ValidationTags#Messaging,FlowControl,Pipeline,CodeStyle#
function Export-DbaRepServerSetting {
    <#
        .SYNOPSIS
            Exports replication server settings to file. 

        .DESCRIPTION
            Exports replication server settings to file. By default, these settings include: 

            Articles
            PublisherSideSubscriptions
            CreateSnapshotAgent
            Go
            EnableReplicationDB
            IncludePublicationAccesses
            IncludeCreateLogreaderAgent
            IncludeCreateQueuereaderAgent
            IncludeSubscriberSideSubscriptions

        .PARAMETER SqlInstance
            The target SQL Server instance or instances

        .PARAMETER SqlCredential
            Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)

        .PARAMETER Path
            Specifies the path to a file which will contain the output.

        .PARAMETER ScriptOption
            Not real sure how to use this yet

        .PARAMETER InputObject
            Allows piping from Get-DbaRepServer

        .PARAMETER EnableException
            By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
            This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
            Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
    
        .NOTES
            Tags: Replication
            Website: https://dbatools.io
            Author: <NAME> (@cl), netnerds.net
            Copyright: (C) <NAME>, <EMAIL>
            License: MIT https://opensource.org/licenses/MIT

        .EXAMPLE
            Export-DbaSpConfigure -SqlInstance sql2017 -Path C:\temp\replication.sql

            Exports the SPConfigure settings on sql2017 to the file C:\temp\replication.sql
        
        .EXAMPLE
            Get-DbaRepServer -SqlInstance sql2017 | Export-DbaRepServerSettings -Path C:\temp\replication.sql

            Exports the replication settings on sql2017 to the file C:\temp\replication.sql
    #>
    [CmdletBinding()]
    param (
        [Parameter(Mandatory, ValueFromPipeline)]
        [Alias("ServerInstance", "SqlServer")]
        [DbaInstanceParameter[]]$SqlInstance,
        [PSCredential]$SqlCredential,
        [string]$Path,
        [object[]]$ScriptOption,
        [Microsoft.SqlServer.Replication.ReplicationServer[]]$InputObject,
        [switch]$EnableException
    )
    process {
        foreach ($instance in $SqlInstance) {<commit_msg>fixed pipeline input<commit_after>#ValidationTags#Messaging,FlowControl,Pipeline,CodeStyle#
function Export-DbaRepServerSetting {
    <#
        .SYNOPSIS
            Exports replication server settings to file. 

        .DESCRIPTION
            Exports replication server settings to file. By default, these settings include: 

            Articles
            PublisherSideSubscriptions
            CreateSnapshotAgent
            Go
            EnableReplicationDB
            IncludePublicationAccesses
            IncludeCreateLogreaderAgent
            IncludeCreateQueuereaderAgent
            IncludeSubscriberSideSubscriptions

        .PARAMETER SqlInstance
            The target SQL Server instance or instances

        .PARAMETER SqlCredential
            Login to the target instance using alternative credentials. Windows and SQL Authentication supported. Accepts credential objects (Get-Credential)

        .PARAMETER Path
            Specifies the path to a file which will contain the output.

        .PARAMETER ScriptOption
            Not real sure how to use this yet

        .PARAMETER InputObject
            Allows piping from Get-DbaRepServer

        .PARAMETER EnableException
            By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
            This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
            Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
    
        .NOTES
            Tags: Replication
            Website: https://dbatools.io
            Author: <NAME> (@cl), netnerds.net
            Copyright: (C) <NAME>, <EMAIL>
            License: MIT https://opensource.org/licenses/MIT

        .EXAMPLE
            Export-DbaSpConfigure -SqlInstance sql2017 -Path C:\temp\replication.sql

            Exports the SPConfigure settings on sql2017 to the file C:\temp\replication.sql
        
        .EXAMPLE
            Get-DbaRepServer -SqlInstance sql2017 | Export-DbaRepServerSettings -Path C:\temp\replication.sql

            Exports the replication settings on sql2017 to the file C:\temp\replication.sql
    #>
    [CmdletBinding()]
    param (
        [Alias("ServerInstance", "SqlServer")]
        [DbaInstanceParameter[]]$SqlInstance,
        [PSCredential]$SqlCredential,
        [string]$Path,
        [object[]]$ScriptOption,
		[Parameter(ValueFromPipeline)]
        [Microsoft.SqlServer.Replication.ReplicationServer[]]$InputObject,
        [switch]$EnableException
    )
    process {
        foreach ($instance in $SqlInstance) {
{'fraction_non_alphanumeric': 0.05844395280235988, 'fraction_numerical': 0.0058997050147492625, 'mean_word_length': 2.307926829268293, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1774764', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1264, 'n_words': 429}