mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-28 01:28:50 +01:00
Update clear-dns-cache.ps1
This commit is contained in:
parent
37601075c8
commit
f7d66192af
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script clears the DNS client cache of the local computer.
|
This PowerShell script clears the DNS client cache of the local computer.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./clear-dns-cache.ps1
|
PS> ./clear-dns-cache.ps1
|
||||||
✔️ cleared DNS cache in 0 ms
|
✔️ Cleared DNS cache in 1 sec
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -18,7 +18,7 @@ try {
|
|||||||
Clear-DnsClientCache
|
Clear-DnsClientCache
|
||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ cleared DNS cache in $Elapsed sec"
|
"✔️ Cleared DNS cache in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user