Public/Get-P1MigrationReport.ps1

function Get-P1MigrationReport {
    <#
    .Synopsis
    Get PlannerOne migration reports.

    .Description
    Return the PlannerOne migration reports for tenant list or for tenant configuration

    .Parameter Tenant
    The tenant name.

    .Parameter Report
    The report name.

    .Example
    # Get the list of report for tenant Prod
    Get-P1MigrationReport -Tenant Prod

    #>

    [cmdletbinding()]
    param( 
        [string] $Tenant,
        [string] $Report
    )
    Process
    {
    if ($Tenant -eq "") {
        if ($Report -eq "") {
            Get-GlobalReportList

            Write-Output "Use Get-P1MigrationReport -Report [REPORT] to read report"
            Write-Output "Use Get-P1Tenant to get a list of available tenants"
        } else {
            Get-GlobalReport $Report
        }
    } else {
        if ($Report -eq "") {
            Get-ConfigReportList $Tenant
            Write-Output "Use Get-P1MigrationReport -Tenant $Tenant -Report [REPORT] to read report"
        } else {
            Get-ConfigReport $Tenant $Report
        }
    }
    }
}