Public/Get-PowerShellNews.ps1

function Get-PowerShellNews {
    <#
    .SYNOPSIS
        Zeigt offizielle News zum Thema PowerShell von Microsoft.
    .EXAMPLE
        Get-PowerShellNews
        Zeigt offizielle News zum Thema PowerShell von Microsoft.
    .OUTPUTS
        [System.String]
    #>


    [CmdletBinding()]
    param()

    $My = [HashTable]::Synchronized(@{})

    $My.FormatHeader      = ''
    $My.FormatNewsLogo    = '📰 '
    $My.FormatReleaseLogo = '📅 '
    $My.FormatTitle       = '📯 '
    $My.FormatLink        = '🔗 '
    $My.FormatDefault     = ''

    if (!$host.UI.SupportsVirtualTerminal) {
        $My.FormatHeader      = [String]::Empty
        $My.FormatNewsLogo    = [String]::Empty
        $My.FormatReleaseLogo = [String]::Empty
        $My.FormatTitle       = [String]::Empty
        $My.FormatLink        = [String]::Empty
        $My.FormatDefault     = [String]::Empty
    }

    "$($My.FormatHeader) $($My.FormatDefault)" | Out-Host
    "$($My.FormatHeader)Microsoft PowerShell Blog $($My.FormatReleaseLogo)News:$($My.FormatDefault)" | Out-Host
    [xml]$content = Invoke-WebRequest -Uri 'https://devblogs.microsoft.com/powershell/feed/' | Select-Object -ExpandProperty Content
    $content.rss.channel.Item | Select-Object pubDate, title, link | ForEach-Object -Process {
        [PSCustomObject]@{
            Release = "$($My.FormatReleaseLogo){0:yyyy-MM-dd}" -f ([DateTime]$_.pubDate)
            News    = @"
    $($My.FormatTitle)$($_.Title)$($My.FormatDefault)
    $($My.FormatLink)$($_.link)$($My.FormatDefault)
"@

        }
    } | Format-Table -Wrap | Out-Host

    Remove-Variable -Name My -Force -ErrorAction Ignore
}