internal/functions/Copy-CFXFSLogixProvider.ps1

function Copy-CFXFSLogixProvider {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [string] $DiskPath,

        [Parameter(Mandatory = $true)]
        [string[]] $ProviderPath
    )


    $diskItem = Get-Item -Path $DiskPath
    foreach ($path in $ProviderPath) {
        $measure = Measure-Command -Expression {
            Copy-Item -Path $DiskPath -Destination $path -ErrorAction Stop
        }
        [PSCustomObject]@{
            ProviderPath = $path
            CopyDuration = "{0}:{1}:{2}.{3}" -f $measure.Hours,$measure.Minutes,$measure.seconds,$measure.Milliseconds
            CopySpeedMBps = ($diskItem.length / 1MB) / $measure.TotalSeconds
        }
    }
}