Rename to check-dns.ps1

This commit is contained in:
Markus Fleschutz 2021-12-01 09:57:36 +01:00
parent bdd653259e
commit 189a4fddf6
9 changed files with 38 additions and 36 deletions

View File

@ -49,7 +49,7 @@ Mega Collection of PowerShell Scripts
| ---------------------------------------------------- | ------------------------------------------------------------------ | --------------------------------------- |
| [add-firewall-rules.ps1](Scripts/add-firewall-rules.ps1) | Adds firewall rules for the given executables (needs admin rights) | [Help](Docs/add-firewall-rules.md) |
| [check-cpu-temp.ps1](Scripts/check-cpu-temp.ps1) | Checks the CPU temperature | [Help](Docs/check-cpu-temp.md) |
| [check-dns-resolution.ps1](Scripts/check-dns-resolution.ps1) | Checks the DNS resolution with frequently used domain names| [Help](Docs/check-dns-resolution.md)|
| [check-dns.ps1](Scripts/check-dns.ps1) | Checks the DNS resolution | [Help](Docs/check-dns.md)|
| [check-drive-space.ps1](Scripts/check-drive-space.ps1) | Checks a drive for free space left | [Help](Docs/check-drive-space.md) |
| [check-file-system.ps1](Scripts/check-file-system.ps1) | Checks the file system of a drive (needs admin rights) | [Help](Docs/check-file-system.md) |
| [check-health.ps1](Scripts/check-health.ps1) | Checks the system health | [Help](Docs/check-health.md) |

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'bye bye'
Answers to 'bye bye'
.DESCRIPTION
This script answers to "bye bye" by text-to-speech (TTS).
This script says a reply to "bye bye" by text-to-speech (TTS).
.EXAMPLE
PS> ./bye-bye
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "Good bye.", "See you.", "Bye bye." | Get-Random
$Reply = "Good bye.", "See you.", "Bye bye." | Get-Random
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success

View File

@ -1,11 +1,11 @@
<#
.SYNOPSIS
Checks the DNS resolution with frequently used domain names
Checks the DNS resolution
.DESCRIPTION
This script checks the DNS resolution with frequently used domain names.
.EXAMPLE
PS> ./check-dns-resolution
11.8 domains/sec (177 domains resolved in 15 sec)
PS> ./check-dns
DNS resolves 11.8 domains/sec (177 domains in 15 sec)
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -31,7 +31,9 @@ try {
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
$Average = [math]::round($Count / $Elapsed, 1)
"✔️ DNS resolves $Average domains/sec ($Count in $Elapsed sec)"
$Reply = "DNS resolves $Average domains/sec ($Count in $Elapsed sec)"
"✔️ $Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"

View File

@ -34,7 +34,7 @@ if ($IsLinux) {
& "$PSScriptRoot/check-cpu-temp.ps1"
if ($lastExitCode -ne "0") { $Healthy = 0 }
& "$PSScriptRoot/check-dns-resolution.ps1"
& "$PSScriptRoot/check-dns.ps1"
if ($lastExitCode -ne "0") { $Healthy = 0 }
& "$PSScriptRoot/check-ping.ps1"

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'good bye'
Answers to 'good bye'
.DESCRIPTION
This script answers to "good bye" by text-to-speech (TTS).
This script says a reply to "good bye" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-bye
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "Good bye.", "See you.", "Bye bye." | Get-Random
$Reply = "Good bye.", "See you.", "Bye bye." | Get-Random
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'good evening'
Answers to 'good evening'
.DESCRIPTION
This script answers "good evening" by text-to-speech (TTS).
This script says a reply to "good evening" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-evening
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "And a special good evening to you too."
$Reply = "And a special good evening to you too."
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'good morning'
Answers to 'good morning'
.DESCRIPTION
This script answers "good morning" by text-to-speech (TTS).
This script says a reply to "good morning" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-morning
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "Good morning.", "Good morning to you too.", "Well, good morning to you too.", "Good morning! How are you?", "Morning." | Get-Random
$Reply = "Good morning.", "Good morning to you too.", "Well, good morning to you too.", "Good morning! How are you?", "Morning." | Get-Random
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'good night'
Answers to 'good night'
.DESCRIPTION
This script answers to "good night" by text-to-speech (TTS).
This script says a reply to "good night" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-night
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "Good night to you, too.", "Good night to you, my friend.", "Have a good night. Sleep well.", "Good night and sweet dreams." | Get-Random
$Reply = "Good night to you, too.", "Good night to you, my friend.", "Have a good night. Sleep well.", "Good night and sweet dreams." | Get-Random
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Say an answer to 'how are you?'
Answers to 'how are you?'
.DESCRIPTION
This script answers "how are you?" by text-to-speech (TTS).
This script says a reply to "how are you?" by text-to-speech (TTS).
.EXAMPLE
PS> ./how-are-you
.NOTES
@ -11,8 +11,8 @@
https://github.com/fleschutz/PowerShell
#>
$Answer = "I'm fine, thanks. How are you?", "I'm fine, maybe a little tired. I need some more coffee.", "Great, thank you. How are you?", "Good, thanks, and you?", "Fine, thanks. How are you?" | Get-Random
$Reply = "I'm fine, thanks. How are you?", "I'm fine, maybe a little tired. I need some more coffee.", "Great, thank you. How are you?", "Good, thanks, and you?", "Fine, thanks. How are you?" | Get-Random
& "$PSScriptRoot/speak-english.ps1" "$Answer"
write-output "$Answer"
"$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success