exports/Export-CVSQLDatabaseRTD.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
Method to submit restore-to-disk SQL database export job.
.Description
Method to submit restore-to-disk SQL database export job.
.Example
{{ Add code here }}
.Example
{{ Add code here }}
 
.Inputs
System.Object
.Outputs
System.String
.Link
https://learn.microsoft.com/powershell/module/commvaultpowershell/export-cvsqldatabasertd
#>

function Export-CVSQLDatabaseRTD {
[OutputType([System.String])]
[CmdletBinding(DefaultParameterSetName='ByName', PositionalBinding=$false)]
param(
    [Parameter(Mandatory)]
    [Commvault.Powershell.Category('Body')]
    [System.String]
    # Export the SQL database files to DestClientName.
    ${DestClientName},

    [Parameter(Mandatory)]
    [Commvault.Powershell.Category('Body')]
    [System.String]
    # Export the SQL database files to DestDiskPath.
    ${DestDiskPath},

    [Parameter(ParameterSetName='ByName', Mandatory)]
    [Commvault.Powershell.Category('Body')]
    [System.String]
    # Specify the database files to be exported by database Name.
    ${Name},

    [Parameter()]
    [Commvault.Powershell.Category('Body')]
    [System.Int32]
    # Export the SQL database files for a given JobId.
    ${JobId},

    [Parameter()]
    [Commvault.Powershell.Category('Body')]
    [System.Management.Automation.SwitchParameter]
    # Switch to control OverwriteExisting of the database files.
    ${OverwriteExisting},

    [Parameter(ParameterSetName='ByObject', Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
    [Commvault.Powershell.Category('Body')]
    [System.Object]
    # Specify the database files to be exported by piping DatabaseObject.
    ${DatabaseObject}
)

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

        $mapping = @{
            ByName = 'CommvaultPowerShell.custom\Export-CVSQLDatabaseRTD';
            ByObject = 'CommvaultPowerShell.custom\Export-CVSQLDatabaseRTD';
        }
        $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
    }
} 
}