Public/Update-MSPBackupFPLocalState.ps1

Function Update-MSPBackupFPLocalState {
<#
        .SYNOPSIS
            Update BackupFPLocalState
        .DESCRIPTION
            Update BackupFPLocalState
        .PARAMETER InputObject
            The Input Object
        .EXAMPLE
            Update-BackupFPLocalState
        .LINK
            about_Functions_Advanced
        .LINK
            about_CommonParameters
    #>

    [CmdletBinding(
        SupportsShouldProcess = $True
    )]
    Param(
        [Parameter(
            Mandatory = $True,
            ValueFromPipeLine = $True
        )]
        $InputObject
    )
    Begin {
    }
    Process {
        If ($PSCmdlet.ShouldProcess("$InputObject", "Convert to UnixTimeStamp")) {
            For ($Days = 1; $Days -le 7; $Days++) {
                If ($InputObject.AddDays($Days).DayOfWeek -eq 'zaterdag' -or $InputObject.AddDays($Days).DayOfWeek -eq 'saturday') {
                    $NewInputObject = $InputObject.AddDays($Days)
                    $NewInputObjectDate = ConvertTo-UnixDate -DateTime $NewInputObject
                    $NewInputObjectDate
                    Break
                }
            }
        }
    }
    End {
    }
}