Functions/Data/Get-EpochTime.ps1

Function Get-EpochTime
    {
    [cmdletbinding()]
    Param
        (
        # Time Threshold
        [Parameter(Mandatory=$False,ValueFromPipeline=$true)]
        [Datetime]
        $Threshold = (Get-Date),

        [Parameter(Mandatory=$False)]
        [Datetime]
        $Epoch = (Get-Date "01/01/1970")
        )
    Process
        {
        # Generate Time span and Round Seconds Down
        [math]::round((New-TimeSpan -Start $Epoch -End ($Threshold.ToUniversalTime())).TotalSeconds,0)
        }
    }