Public/Set-MSPBackupSchedule.ps1

Function Set-MSPBackupSchedule {
[CmdletBinding(SupportsShouldProcess = $true)]
    [OutputType('System.String')]
    Param(
        [Int]$Id,
        [bool]$Active,
        [String[]]$Datasource,
        [String[]]$Day,
        [String]$Name,
        [Int]$PostBackupAction,
        [Int]$PreBackupAction,
        [datetime]$Time
    )
    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.schedule.modify
    }
    End {
        Write-Verbose ('{0}:: Function ended' -f $MyInvocation.MyCommand)
        Return $Status
    }
}