mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-25 09:23:12 +01:00
Update check-health.ps1, list-news.ps1, and write-typewriter.ps1
This commit is contained in:
parent
59d1220f36
commit
deec73527f
@ -16,8 +16,8 @@
|
||||
& "$PSScriptRoot/check-time-zone.ps1"
|
||||
& "$PSScriptRoot/check-cpu.ps1"
|
||||
& "$PSScriptRoot/check-ram.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-swap-space.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-drives.ps1"
|
||||
& "$PSScriptRoot/check-dns.ps1"
|
||||
& "$PSScriptRoot/check-ping.ps1"
|
||||
|
@ -21,12 +21,13 @@ try {
|
||||
[xml]$Content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
||||
[int]$Count = 1
|
||||
foreach ($Item in $Content.rss.channel.item) {
|
||||
"→ $($Item.title)"
|
||||
# "→ $($Item.title)"
|
||||
& "$PSScriptRoot/write-typewriter.ps1" "→ $($Item.title)" 30 # ms speed
|
||||
if ($Count++ -eq $MaxCount) { break }
|
||||
}
|
||||
$Source = $Content.rss.channel.title
|
||||
$Date = $Content.rss.channel.pubDate
|
||||
" Source: $Source (as of $Date)"
|
||||
" Updated: $Date by: $Source"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -19,11 +19,11 @@ param([string]$text = "`nHello World`n-----------`n* PowerShell is powerful - fu
|
||||
|
||||
try {
|
||||
$Random = New-Object System.Random
|
||||
|
||||
$text -split '' | ForEach-Object {
|
||||
Write-Host -noNewline $_
|
||||
Start-Sleep -milliseconds $(1 + $Random.Next($speed))
|
||||
}
|
||||
Write-Host ""
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user