Various Powershell Scripts
Various Powershell Scripts 관련
add-memo.ps1
This PowerShell script saves the given memo text to Memos.csv in your home folder.
check-ipv4-address.ps1
This PowerShell script checks the given IPv4 address for validity.
check-ipv6-address.ps1
This PowerShell script checks the given IPv6 address for validity
check-mac-address.ps1
This PowerShell script checks the given MAC address for validity Supported MAC address formats are:
00:00:00:00:00:00or00-00-00-00-00-00or000000000000
check-subnet-mask.ps1
This PowerShell script checks the given subnet mask for validity.
display-time.ps1
This PowerShell script displays the current time (for 10 seconds by default)
list-environment-variables.ps1
This PowerShell script lists all environment variables.
list-emojis.ps1
This PowerShell script lists the emojis of Unicode 13.0 sorted by category.
list-exchange-rates.ps1
This PowerShell script lists the current exchange rates for the given currency (USD per default).
list-memos.ps1
This PowerShell script lists all memo entries in Memos.csv in your home folder.
list-mysql-tables.ps1
This PowerShell script lists all tables of the given MySQL database.
list-news.ps1
This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds.
list-os-releases.ps1
This PowerShell script lists OS releases and download URL.
list-os-updates.ps1
This PowerShell script lists the latest updates for operating systems.
list-passwords.ps1
This PowerShell script lists random passwords.
:: tabs
@tab:active Parameters
PS> ./list-passwords.ps1 [[-PasswordLength] <Int32>] [[-Columns] <Int32>] [[-Rows] <Int32>] [<CommonParameters>]
-PasswordLength <Int32>
Specifies the length of the password
Required? false
Position? 1
Default value 15
Accept pipeline input? false
Accept wildcard characters? false
-Columns <Int32>
Specifies the number of columns
Required? false
Position? 2
Default value 6
Accept pipeline input? false
Accept wildcard characters? false
-Rows <Int32>
Specifies the number of rows
Required? false
Position? 3
Default value 30
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.
@tab Example
PS> ./list-passwords.ps1
#
#
#
# "4yE=[mu"Az|IE@ PZ}E9Q"&?.!%49` zU3[E7`xA)(6W_3 :wd'a(O@fr}.Z8=
# ...
#
@tab Script Content
<#
.SYNOPSIS
Lists random passwords
.DESCRIPTION
This PowerShell script lists random passwords.
.PARAMETER PasswordLength
Specifies the length of the password
.PARAMETER Columns
Specifies the number of columns
.PARAMETER Rows
Specifies the number of rows
.EXAMPLE
PS> ./list-passwords.ps1
"4yE=[mu"Az|IE@ PZ}E9Q"&?.!%49` zU3[E7`xA)(6W_3 :wd'a(O@fr}.Z8=
...
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
param([int]$PasswordLength = 15, [int]$Columns = 6, [int]$Rows = 30)
$MinCharCode = 33
$MaxCharCode = 126
try {
write-output ""
$Generator = New-Object System.Random
for ($j = 0; $j -lt $Rows; $j++) {
$Line = ""
for ($k = 0; $k -lt $Columns; $k++) {
for ($i = 0; $i -lt $PasswordLength; $i++) {
$Line += [char]$Generator.next($MinCharCode,$MaxCharCode)
}
$Line += " "
}
write-output "$Line"
}
write-output ""
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
:::
list-pins.ps1
This PowerShell script lists random PIN's.
list-sql-tables.ps1
This PowerShell script lists all tables in a SQL server database and exports the list as CSV.
Install-Module InvokeQuery
Run the above command if you do not have this module.
list-weather.ps1
This PowerShell script lists the hourly weather report in a nice table.
locate-city.ps1
This PowerShell script prints the geographic location of the given city.
locate-ipaddress.ps1
moon.ps1
This PowerShell script prints the current moon phase.
scan-ports.ps1
This PowerShell script scans the network for open or closed ports.
send-tcp.ps1
This PowerShell script sends a TCP message to the given IP address and port.
send-udp.ps1
This PowerShell script sends a UDP datagram message to an IP address and port.
set-timer.ps1
This PowerShell script sets a timer for a countdown.
simulate-presence.ps1
This PowerShell script simulates the human presence against burglars. It switches a Shelly1 device on and off.
start-ipfs-server.ps1
This PowerShell script starts a local IPFS server as a daemon process.
translate-file.ps1
This PowerShell script translates the given text file into another language and writes the output on the console.
translate-files.ps1
This PowerShell script translates text files into multiple languages.
translate-text.ps1
This PowerShell script translates text into other languages.
weather.ps1
This PowerShell script lists the current weather forecast.
weather-report.ps1
This PowerShell script lists the local weather report.