Public/Set-MSPBackupSelection.ps1

Function Set-MSPBackupSelection {
[CmdletBinding(SupportsShouldProcess = $true)]
    [OutputType('System.String')]
    Param(
        [Parameter(Mandatory=$True)]
        [String]$Datasource,
        [Parameter(ParameterSetName = "Exclude")]
        [System.IO.FileInfo]$Exclude,
        [Parameter(ParameterSetName = "Include")]
        [System.IO.FileInfo]$Include,
        [Parameter(ParameterSetName = "Include")]
        [String]$Priority = "Normal"
    )
    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.modify
    }
    End {
        Write-Verbose ('{0}:: Function ended' -f $MyInvocation.MyCommand)
        Return $Status
    }
}