Public/Get-MSPBackupSelection.ps1

Function Get-MSPBackupSelection {
    <#
        .SYNOPSIS
            List backup selections.
        .DESCRIPTION
            List backup selections. Produces a table with columns in this order:
                DSRC Datasource
                TYPE Type (inclusive, exclusive)
                PRIO Priority
                PATH Selected path
        .PARAMETER Datasource
            Datasource to list selections for. Possible values are Exchange, FileSystem, MySql, NetworkShares, Oracle,
            SystemState, VMware, VssHyperV, VssMsSql or VssSharePoint.
        .INPUTS
            None
        .OUTPUTS
            None
        .EXAMPLE
            Get-MSPBackupSelection
        .LINK
            about_functions_advanced
        .LINK
            about_CommonParameters
    #>

    [CmdletBinding()]
    [OutputType('System.String')]
    Param(
        [String]$Datasource
    )
    Begin {
        Write-Verbose ('{0}:: Function started' -f $MyInvocation.MyCommand)
        $stdOutTempFile = [System.IO.Path]::GetTempFileName()
        $stdErrTempFile = [System.IO.Path]::GetTempFileName()
    }
    Process {
        Write-Verbose ('{0}:: Getting status' -f $MyInvocation.MyCommand)
        $Status = & $Script:CmdPath -machine-readable control.selection.list -no-header -delimiter ';' -datasource $Datasource
    }
    End {
        Write-Verbose ('{0}:: Function ended' -f $MyInvocation.MyCommand)
        Return $Status
    }
}