exports/Send-CVLogFile.ps1


# ----------------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/powershell@4.0.708)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create Send Log Files task for client or specific job.
.Description
Create Send Log Files task for client or specific job.
.Example
{{ Add code here }}
.Example
{{ Add code here }}
 
.Outputs
System.String
.Link
https://learn.microsoft.com/powershell/module/commvaultpowershell/send-cvlogfile
#>

function Send-CVLogFile {
[Alias('Start-CVSendLogFiles')]
[OutputType([System.String])]
[CmdletBinding(DefaultParameterSetName='ById', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
    [Parameter(ParameterSetName='ById', Mandatory)]
    [Commvault.Powershell.Category('Body')]
    [System.Int32]
    # Create Send Log Files task for job identified by JobId.
    ${JobId},

    [Parameter()]
    [Commvault.Powershell.Category('Body')]
    [System.String]
    # Specify EmailAddr for notification purpose.
    ${EmailAddr},

    [Parameter()]
    [Commvault.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Switch to Force override of default 'WhatIf' confirmation behavior.
    ${Force},

    [Parameter(ParameterSetName='ByName', Mandatory)]
    [Commvault.Powershell.Category('Body')]
    [System.String]
    # Create Send Log Files task for client identified by ClientName.
    ${ClientName}
)

begin {
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $parameterSet = $PSCmdlet.ParameterSetName

        $mapping = @{
            ById = 'CommvaultPowerShell.custom\Send-CVLogFile';
            ByName = 'CommvaultPowerShell.custom\Send-CVLogFile';
        }
        $cmdInfo = Get-Command -Name $mapping[$parameterSet]
        [Commvault.Powershell.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        [Commvault.Powershell.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
        $scriptCmd = {& $wrappedCmd @PSBoundParameters}
        $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
        $steppablePipeline.Begin($PSCmdlet)
    } catch {

        throw
    }
}

process {
    try {
        $steppablePipeline.Process($_)
    } catch {

        throw
    }

}
end {
    try {
        $steppablePipeline.End()

    } catch {

        throw
    }
} 
}