Skip to content

list-os-updates

Lists OS updates

#Requires -Version 5.1

param([string]$RSS_URL = "https://distrowatch.com/news/dwd.xml", [int]$MaxCount = 30)

try {
	" "
	"Date  OS Update"
	"----  ---------"
	[xml]$Content = (Invoke-WebRequest -URI $RSS_URL -userAgent "curl" -useBasicParsing).Content


	[int]$Count = 0
	foreach ($item in $Content.rss.channel.item) {
		"$($item.title)"
		$Count++
		if ($Count -eq $MaxCount) { break }
	}
	"      (source: DistroWatch.com)"
	exit 0
} catch {
throw
}

Specifies the URL to the RSS feed

Specifies the number of news to list

An interactive directory of PowerShell scripts.