mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Add list-os-updates.ps1
This commit is contained in:
parent
8dff4e1012
commit
6f5af190c9
@ -102,7 +102,8 @@ list-modules.ps1, lists the PowerShell modules
|
|||||||
list-mysql-tables.ps1, lists the MySQL server tables
|
list-mysql-tables.ps1, lists the MySQL server tables
|
||||||
list-network-shares.ps1, lists the network shares of the local computer
|
list-network-shares.ps1, lists the network shares of the local computer
|
||||||
list-news.ps1, lists the latest news
|
list-news.ps1, lists the latest news
|
||||||
list-os-releases.ps1, lists OS releases and download URL
|
list-os-releases.ps1, lists operating system releases and download URL
|
||||||
|
list-os-updates.ps1, lists operating system updates
|
||||||
list-printers.ps1, lists all printer known to the computer
|
list-printers.ps1, lists all printer known to the computer
|
||||||
list-processes.ps1, lists the local computer processes
|
list-processes.ps1, lists the local computer processes
|
||||||
list-profiles.ps1, lists your PowerShell profiles
|
list-profiles.ps1, lists your PowerShell profiles
|
||||||
|
|
@ -187,7 +187,8 @@ Mega Collection of PowerShell Scripts
|
|||||||
* [list-earthquakes.ps1](Scripts/list-earthquakes.ps1) - lists earthquakes with magnitude >= 6.0 for the last 30 days
|
* [list-earthquakes.ps1](Scripts/list-earthquakes.ps1) - lists earthquakes with magnitude >= 6.0 for the last 30 days
|
||||||
* [list-mysql-tables.ps1](Scripts/list-mysql-tables.ps1) - lists the MySQL server tables
|
* [list-mysql-tables.ps1](Scripts/list-mysql-tables.ps1) - lists the MySQL server tables
|
||||||
* [list-news.ps1](Scripts/list-news.ps1) - lists the latest news
|
* [list-news.ps1](Scripts/list-news.ps1) - lists the latest news
|
||||||
* [list-os-releases.ps1](Scripts/list-os-releases.ps1) - lists OS releases and download URL
|
* [list-os-releases.ps1](Scripts/list-os-releases.ps1) - lists operating system releases and download URL
|
||||||
|
* [list-os-updates.ps1](Scripts/list-os-updates.ps1) - lists operating system updates
|
||||||
* [list-random-passwords.ps1](Scripts/list-random-passwords.ps1) - prints a list of random passwords
|
* [list-random-passwords.ps1](Scripts/list-random-passwords.ps1) - prints a list of random passwords
|
||||||
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
|
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
|
||||||
* [list-sql-tables.ps1](Scripts/list-sql-tables.ps1) - lists the SQL server tables
|
* [list-sql-tables.ps1](Scripts/list-sql-tables.ps1) - lists the SQL server tables
|
||||||
|
25
Scripts/list-os-updates.ps1
Executable file
25
Scripts/list-os-updates.ps1
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
<#
|
||||||
|
.SYNTAX list-os-updates.ps1 [<RSS-URL>] [<max-count>]
|
||||||
|
.DESCRIPTION lists the latest operating system updates
|
||||||
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
param($RSS_URL = "https://distrowatch.com/news/dwd.xml", [int]$MaxCount = 20)
|
||||||
|
|
||||||
|
try {
|
||||||
|
& "$PSScriptRoot/write-big.ps1" "OS Updates"
|
||||||
|
[xml]$Content = (invoke-webRequest -URI $RSS_URL).Content
|
||||||
|
"`t(by $($Content.rss.channel.title))"
|
||||||
|
|
||||||
|
[int]$Count = 0
|
||||||
|
foreach ($item in $Content.rss.channel.item) {
|
||||||
|
"`t→ $($item.title)"
|
||||||
|
$Count++
|
||||||
|
if ($Count -eq $MaxCount) { break }
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user