mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-22 07:53:21 +01:00
Merge branch 'master' of github.com:fleschutz/PowerShell
This commit is contained in:
commit
722c59256a
@ -6,10 +6,10 @@ This PowerShell script adds firewall rules for the given executable. Administrat
|
||||
Parameters
|
||||
----------
|
||||
```powershell
|
||||
PS> ./add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>]
|
||||
PS> ./add-firewall-rules.ps1 [[-PathToExecutables] <String>] [[-Direction] <String>] [[-FirewallProfile] <Array>] [<CommonParameters>]
|
||||
|
||||
-PathToExecutables <String>
|
||||
Specifies the path to the executables
|
||||
Specifies the path to the executables.
|
||||
|
||||
Required? false
|
||||
Position? 1
|
||||
@ -17,6 +17,23 @@ PS> ./add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>
|
||||
Accept pipeline input? false
|
||||
Accept wildcard characters? false
|
||||
|
||||
-Direction <String>
|
||||
Specifies the direction for the firewall rule. Can be 'Inbound' or 'Outbound'. Default is 'Inbound'.
|
||||
|
||||
Required? false
|
||||
Position? 2
|
||||
Default value Inbound
|
||||
Accept pipeline input? false
|
||||
Accept wildcard characters? false
|
||||
|
||||
-FirewallProfile <Array>
|
||||
|
||||
Required? false
|
||||
Position? 3
|
||||
Default value @("Domain", "Private")
|
||||
Accept pipeline input? false
|
||||
Accept wildcard characters? false
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||
@ -25,10 +42,7 @@ PS> ./add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>
|
||||
Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./add-firewall-rules.ps1 C:\MyApp\bin
|
||||
Adding firewall rule for C:\MyApp\bin\app1.exe
|
||||
Adding firewall rule for C:\MyApp\bin\app2.exe
|
||||
...
|
||||
PS> ./add-firewall-rules.ps1 -PathToExecutables C:\MyApp\bin -Direction Outbound -Profile Private
|
||||
|
||||
```
|
||||
|
||||
@ -45,16 +59,17 @@ Script Content
|
||||
```powershell
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Adds firewall rules for executables (needs admin rights)
|
||||
Adds firewall rules for executables (needs admin rights).
|
||||
.DESCRIPTION
|
||||
This PowerShell script adds firewall rules for the given executable. Administrator rights are required.
|
||||
.PARAMETER PathToExecutables
|
||||
Specifies the path to the executables
|
||||
Specifies the path to the executables.
|
||||
.PARAMETER Direction
|
||||
Specifies the direction for the firewall rule. Can be 'Inbound' or 'Outbound'. Default is 'Inbound'.
|
||||
.PARAMETER Profile
|
||||
Specifies the firewall profile. Can be 'Domain', 'Private', or 'Public'. Multiple values can be specified as an array.
|
||||
.EXAMPLE
|
||||
PS> ./add-firewall-rules.ps1 C:\MyApp\bin
|
||||
Adding firewall rule for C:\MyApp\bin\app1.exe
|
||||
Adding firewall rule for C:\MyApp\bin\app2.exe
|
||||
...
|
||||
PS> ./add-firewall-rules.ps1 -PathToExecutables C:\MyApp\bin -Direction Outbound -Profile Private
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -63,50 +78,39 @@ Script Content
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
param([string]$PathToExecutables = "")
|
||||
|
||||
$command = '
|
||||
$output = ''Firewall rules for path '' + $args[0]
|
||||
write-output $output
|
||||
for($i = 1; $i -lt $args.count; $i++){
|
||||
$path = $args[0]
|
||||
$path += ''\''
|
||||
$path += $args[$i]
|
||||
|
||||
$null = $args[$i] -match ''[^\\]*\.exe$''
|
||||
$name = $matches[0]
|
||||
$output = ''Adding firewall rule for '' + $name
|
||||
write-output $output
|
||||
$null = New-NetFirewallRule -DisplayName $name -Direction Inbound -Program $path -Profile Domain, Private -Action Allow
|
||||
}
|
||||
write-host -foregroundColor green -noNewline ''Done - press any key to continue...'';
|
||||
[void]$Host.UI.RawUI.ReadKey(''NoEcho,IncludeKeyDown'');
|
||||
'
|
||||
|
||||
param(
|
||||
[string]$PathToExecutables = "",
|
||||
[string]$Direction = "Inbound",
|
||||
[array]$FirewallProfile = @("Domain", "Private")
|
||||
)
|
||||
|
||||
try {
|
||||
if ($PathToExecutables -eq "" ) {
|
||||
$PathToExecutables = read-host "Enter path to executables"
|
||||
if (-not $PathToExecutables) {
|
||||
$PathToExecutables = Read-Host "Enter path to executables"
|
||||
}
|
||||
|
||||
$PathToExecutables = Convert-Path -Path $PathToExecutables
|
||||
$AbsPath = Convert-Path -Path $PathToExecutables
|
||||
$Executables = Get-ChildItem -Path $AbsPath -Filter "*.exe"
|
||||
|
||||
$Apps = Get-ChildItem "$PathToExecutables\*.exe" -Name
|
||||
|
||||
if($Apps.count -eq 0){
|
||||
write-warning "No executables found. No Firewall rules have been created."
|
||||
Write-Host -NoNewhLine 'Press any key to continue...';
|
||||
[void]$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
|
||||
exit 1
|
||||
if (-not $Executables) {
|
||||
Write-Warning "No executables found. No Firewall rules have been created."
|
||||
Read-Host "Press Enter to continue..."
|
||||
return
|
||||
}
|
||||
|
||||
$arg = "PathToExecutables $Apps"
|
||||
Start-Process powershell -Verb runAs -ArgumentList "-command & {$command} $arg"
|
||||
exit 0 # success
|
||||
foreach ($exe in $Executables) {
|
||||
$exeName = $exe.Name
|
||||
$exeFullPath = $exe.FullName
|
||||
|
||||
Write-Output "Adding firewall rule for $exeName"
|
||||
New-NetFirewallRule -DisplayName $exeName -Direction $Direction -Program $exeFullPath -Profile $FirewallProfile -Action Allow
|
||||
}
|
||||
|
||||
Write-Host -ForegroundColor Green "Done"
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
Write-Error "Error in line $($_.InvocationInfo.ScriptLineNumber): $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 09/13/2023 09:48:36)*
|
||||
|
@ -79,4 +79,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -71,4 +71,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -177,4 +177,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -82,4 +82,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -48,4 +48,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 09/01/2023 17:51:47)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -62,4 +62,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -62,4 +62,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -53,4 +53,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -80,4 +80,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -57,4 +57,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -55,4 +55,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -50,4 +50,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -62,4 +62,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -53,4 +53,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -62,4 +62,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -79,4 +79,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -75,4 +75,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -76,4 +76,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -103,4 +103,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -57,4 +57,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -1,7 +1,7 @@
|
||||
*check-dns.ps1*
|
||||
================
|
||||
|
||||
This PowerShell script measures and prints the DNS resolution speed by using 200 popular domains.
|
||||
This PowerShell script measures the DNS resolution speed (using 100 popular domains) and prints it.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@ -17,7 +17,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./check-dns.ps1
|
||||
✅ DNS resolves 156.5 domains per second
|
||||
✅ DNS resolves 56.5 domains per second
|
||||
|
||||
```
|
||||
|
||||
@ -34,12 +34,12 @@ Script Content
|
||||
```powershell
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Check DNS resolution
|
||||
Check the DNS resolution
|
||||
.DESCRIPTION
|
||||
This PowerShell script measures and prints the DNS resolution speed by using 200 popular domains.
|
||||
This PowerShell script measures the DNS resolution speed (using 100 popular domains) and prints it.
|
||||
.EXAMPLE
|
||||
PS> ./check-dns.ps1
|
||||
✅ DNS resolves 156.5 domains per second
|
||||
✅ DNS resolves 56.5 domains per second
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -47,15 +47,15 @@ Script Content
|
||||
#>
|
||||
|
||||
try {
|
||||
Write-Progress "⏳ Resolving 200 popular domain names..."
|
||||
$table = Import-CSV "$PSScriptRoot/../Data/popular-domains.csv"
|
||||
$numRows = $table.Length
|
||||
Write-Progress "⏳ Resolving $numRows domain names..."
|
||||
|
||||
$stopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||
if ($IsLinux) {
|
||||
foreach($row in $table){$nop=dig $row.Domain +short}
|
||||
foreach($row in $table){$nop=dig $row.Domain +short}
|
||||
} else {
|
||||
foreach($row in $table){$nop=Resolve-DNSName $row.Domain}
|
||||
foreach($row in $table){$nop=Resolve-DNSName $row.Domain}
|
||||
}
|
||||
Write-Progress -completed "."
|
||||
[float]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
@ -72,4 +72,4 @@ foreach($row in $table){$nop=Resolve-DNSName $row.Domain}
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -91,4 +91,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -105,4 +105,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -63,4 +63,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -61,4 +61,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -75,4 +75,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -170,4 +170,4 @@ function Check-Header { param( $path )
|
||||
Check-Header $Path
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -65,4 +65,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -65,4 +65,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -63,4 +63,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -58,4 +58,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -61,4 +61,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 09/13/2023 09:48:37)*
|
||||
|
@ -84,4 +84,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -98,4 +98,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -55,4 +55,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -87,4 +87,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -57,4 +57,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -76,4 +76,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -21,7 +21,7 @@ PS> ./check-network.ps1
|
||||
|
||||
|
||||
N E T W O R K
|
||||
✅ Firewall enabled
|
||||
✅ Online with 30ms latency (16ms..56ms, 0/10 loss)
|
||||
...
|
||||
|
||||
```
|
||||
@ -46,7 +46,7 @@ Script Content
|
||||
PS> ./check-network.ps1
|
||||
|
||||
N E T W O R K
|
||||
✅ Firewall enabled
|
||||
✅ Online with 30ms latency (16ms..56ms, 0/10 loss)
|
||||
...
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
@ -56,12 +56,12 @@ Script Content
|
||||
|
||||
" "
|
||||
& "$PSScriptRoot/write-green.ps1" " N E T W O R K"
|
||||
& "$PSScriptRoot/check-firewall"
|
||||
& "$PSScriptRoot/check-ping.ps1"
|
||||
& "$PSScriptRoot/check-firewall"
|
||||
& "$PSScriptRoot/check-dns.ps1"
|
||||
& "$PSScriptRoot/check-vpn.ps1"
|
||||
& "$PSScriptRoot/list-public-ip.ps1"
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -59,4 +59,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -73,4 +73,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -65,4 +65,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 09/01/2023 17:51:48)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -94,4 +94,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -92,4 +92,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -26,7 +26,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./check-ping.ps1
|
||||
✅ Ping latency is 29ms average (13ms...109ms, 0/10 loss)
|
||||
✅ Online with 18ms latency average (13ms...109ms, 0/10 ping loss)
|
||||
|
||||
```
|
||||
|
||||
@ -50,7 +50,7 @@ Script Content
|
||||
Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,github.com,google.com,live.com,meta.com,x.com,youtube.com)
|
||||
.EXAMPLE
|
||||
PS> ./check-ping.ps1
|
||||
✅ Ping latency is 29ms average (13ms...109ms, 0/10 loss)
|
||||
✅ Online with 18ms latency average (13ms...109ms, 0/10 ping loss)
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -79,11 +79,11 @@ try {
|
||||
$lossCount++
|
||||
}
|
||||
}
|
||||
if ($successCount -eq 0) {
|
||||
Write-Host "⚠️ Offline ($lossCount/$totalCount loss)"
|
||||
} else {
|
||||
if ($successCount -ne 0) {
|
||||
$avg /= $successCount
|
||||
Write-Host "✅ Ping latency is $($avg)ms average ($($min)ms...$($max)ms, $lossCount/$totalCount loss)"
|
||||
Write-Host "✅ Online with $($avg)ms latency average ($($min)ms...$($max)ms, $lossCount/$totalCount ping loss)"
|
||||
} else {
|
||||
Write-Host "⚠️ Offline ($lossCount/$totalCount ping loss)"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
@ -92,4 +92,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -90,4 +90,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -64,4 +64,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -76,4 +76,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -98,4 +98,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -120,7 +120,7 @@ try {
|
||||
|
||||
$RepoDirName = (Get-Item "$FullPath").Name
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ checked Git repository 📂$RepoDirName in $Elapsed sec"
|
||||
"✔️ Checked repo 📂$RepoDirName in $Elapsed sec"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
@ -128,4 +128,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -56,4 +56,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -95,4 +95,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -69,4 +69,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -84,4 +84,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -105,4 +105,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -100,4 +100,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -65,4 +65,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -82,4 +82,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -17,7 +17,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./check-vpn.ps1
|
||||
✅ VPN disconnected to NASA L2TP
|
||||
✅ VPN to NASA L2TP is connected
|
||||
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ Script Content
|
||||
This PowerShell script queries the status of the VPN connection(s) and prints it.
|
||||
.EXAMPLE
|
||||
PS> ./check-vpn.ps1
|
||||
✅ VPN disconnected to NASA L2TP
|
||||
✅ VPN to NASA L2TP is connected
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -53,7 +53,7 @@ try {
|
||||
} else {
|
||||
$Connections = Get-VPNConnection
|
||||
foreach($Connection in $Connections) {
|
||||
Write-Host "✅ VPN $($Connection.ConnectionStatus.ToLower()) to $($Connection.Name)"
|
||||
Write-Host "✅ VPN to $($Connection.Name) is $($Connection.ConnectionStatus.ToLower())"
|
||||
$noVPN = $false
|
||||
}
|
||||
}
|
||||
@ -65,4 +65,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -81,4 +81,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -54,4 +54,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -72,4 +72,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -88,4 +88,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -101,4 +101,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -92,4 +92,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -17,7 +17,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./clear-dns-cache.ps1
|
||||
✔️ cleared DNS cache in 0 ms
|
||||
✔️ Cleared DNS cache in 1 sec
|
||||
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ Script Content
|
||||
This PowerShell script clears the DNS client cache of the local computer.
|
||||
.EXAMPLE
|
||||
PS> ./clear-dns-cache.ps1
|
||||
✔️ cleared DNS cache in 0 ms
|
||||
✔️ Cleared DNS cache in 1 sec
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -52,7 +52,7 @@ try {
|
||||
Clear-DnsClientCache
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
"✔️ cleared DNS cache in $Elapsed sec"
|
||||
"✔️ Cleared DNS cache in $Elapsed sec"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
@ -60,4 +60,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -58,4 +58,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -119,4 +119,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ Stop-Process -name "CalculatorApp"
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") {
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ Script Content
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") {
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -48,4 +48,4 @@ tskill magnify
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") {
|
||||
exit 0 # success
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 09/01/2023 17:51:49)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 09/13/2023 09:48:38)*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user