mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-23 13:31:28 +02:00
Updated clear-dns-cache.ps1
This commit is contained in:
parent
04f833531e
commit
166aabba5b
@ -2,10 +2,10 @@
|
||||
.SYNOPSIS
|
||||
Clears the DNS cache
|
||||
.DESCRIPTION
|
||||
This PowerShell script clears the DNS client cache of the local computer.
|
||||
This PowerShell script empties the DNS client cache of the local computer.
|
||||
.EXAMPLE
|
||||
PS> ./clear-dns-cache.ps1
|
||||
✅ Cleared DNS cache in 1s.
|
||||
✅ DNS cache cleared in 1s.
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -18,9 +18,9 @@ try {
|
||||
Clear-DnsClientCache
|
||||
|
||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
"✅ Cleared DNS cache in $($elapsed)s."
|
||||
"✅ DNS cache cleared in $($elapsed)s."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
"⚠️ Error: $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user