Chapters/proxy-functions/lab-results/result.ps1

function Export-TDF {
[CmdletBinding(DefaultParameterSetName='Delimiter',
SupportsShouldProcess=$true,
ConfirmImpact='Medium',
HelpUri='http://go.microsoft.com/fwlink/?LinkID=113299')]
param(
    [Parameter(
      Mandatory=$true,
      ValueFromPipeline=$true,
      ValueFromPipelineByPropertyName=$true
      )]
    [psobject]$InputObject,

    [Parameter(Position=0)]
    [ValidateNotNullOrEmpty()]
    [string]$Path,

    [Alias('PSPath')]
    [ValidateNotNullOrEmpty()]
    [string]$LiteralPath,

    [switch]$Force,

    [Alias('NoOverwrite')]
    [switch]$NoClobber,

    [ValidateSet('Unicode','UTF7','UTF8','ASCII','UTF32',
    'BigEndianUnicode','Default','OEM')]
    [string]$Encoding,

    [switch]$Append,

    [Parameter(ParameterSetName='UseCulture')]
    [switch]$UseCulture,

    [Alias('NTI')]
    [switch]$NoTypeInformation
    )

begin
{
    try {
        $outBuffer = $null
        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
        {
            $PSBoundParameters['OutBuffer'] = 1
        }
        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Utility\Export-Csv',
         [System.Management.Automation.CommandTypes]::Cmdlet)
        $PSBoundParameters += @{'Delimiter'="`t"}
        $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
    }
}

} #close function
   )



begin

{

    try {

        $outBuffer = $null

        if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))

        {

            $PSBoundParameters['OutBuffer'] = 1

        }

        $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Utility\Export-Csv',

         [System.Management.Automation.CommandTypes]::Cmdlet)

        $PSBoundParameters += @{'Delimiter'="`t"}

        $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

    }

}



} #close function