Private/Format-Result.ps1

function Format-Result {
    <#
    .SYNOPSIS
    Writes an output message to the console
    .DESCRIPTION
    This function is used internally to prompt messages to the PowerShell console
    .EXAMPLE
    Write-Result -FunctionName $MyInvocation.MyCommand.Name -Message 'This is a message'
    .NOTES
    NAME: Write-Message
    #>


    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [array]$Message
    )
        $result = @()

        foreach ($value in $Message) {
        $split = $value.id.Split('/')
            $result += [ordered]@{
                Name              = $split[-1]
                ResourceGroupName = $split[-9]
                ResourceType      = '{0}/{1}' -f $split[-3], $split[-2]
                WorkspaceName     = $split[-5]
                ResourceId        = $value.id
                Tags              = $value.tags
                Properties        = $value.properties
            } | ConvertTo-Json -Depth 10 | ConvertFrom-Json -Depth 10
        }
    return $result
}
# SIG # Begin signature block
# MIIbwQYJKoZIhvcNAQcCoIIbsjCCG64CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUDzBLoZ7mqUPsQ2LkETnzChgM
# EBmgghYrMIIDHjCCAgagAwIBAgIQYIvF2ca16Y1DENtprz1s/TANBgkqhkiG9w0B
# AQsFADAnMSUwIwYDVQQDDBxQb3dlclNoZWxsIENvZGUgU2lnbmluZyBDZXJ0MB4X
# DTIzMDgxMTA4MjkzN1oXDTI0MDgxMTA4NDkzN1owJzElMCMGA1UEAwwcUG93ZXJT
# aGVsbCBDb2RlIFNpZ25pbmcgQ2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
# AQoCggEBAM6+m8R+WvLUYJS+J3OGPULBR0kXAnAOsdcka9fr2oK3w+bskIuvJsQF
# lyG5TSf+CxWoYo8eSwSt55UgBqIjfKb7KLP32wzhrHxx/hFcPutWe+igoOsbftCt
# veykG9qOGhH6rK9u5L7rZ7U++TJD6EAvJRjz2dtRz/J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