mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 15:46:35 +01:00
Updated the scripts
This commit is contained in:
parent
40aad7fe73
commit
92b6c81620
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$File)
|
||||
param([string]$File = "")
|
||||
|
||||
try {
|
||||
if ($File -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$File)
|
||||
param([string]$File = "")
|
||||
|
||||
try {
|
||||
if ($File -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$File)
|
||||
param([string]$File = "")
|
||||
|
||||
try {
|
||||
if ($File -eq "" ) {
|
||||
|
@ -19,7 +19,7 @@ $QuietZone = 1
|
||||
$ForegroundColor = "000000"
|
||||
$BackgroundColor = "ffffff"
|
||||
$FileFormat = "jpg"
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
$NewFile = "$PathToRepo/Data/qrcode.jpg"
|
||||
|
||||
try {
|
||||
|
@ -6,9 +6,10 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
write-progress "Reading Data/logbook.csv..."
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/logbook.csv"
|
||||
|
||||
write-output ""
|
||||
|
@ -6,9 +6,10 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
write-progress "Reading OS_IPFS_hashes.csv"
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
$PathToCsvFile = "$PathToRepo/Data/os-release.csv"
|
||||
invoke-webRequest -URI "https://fleschutz.droppages.com/downloads/OS_IPFS_hashes.csv" -outFile "$PathToCsvFile"
|
||||
$Table = import-csv "$PathToCsvFile"
|
||||
|
@ -6,9 +6,10 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
write-progress "Reading Data/scripts.csv..."
|
||||
$PathToRepo = (get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/scripts.csv"
|
||||
|
||||
write-output ""
|
||||
|
@ -10,10 +10,10 @@ param([string]$City)
|
||||
if ($City -eq "" ) {
|
||||
$City = read-host "Enter the city"
|
||||
}
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
write-progress "Reading worldcities.csv..."
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/worldcities.csv"
|
||||
|
||||
$FoundOne = 0
|
||||
|
@ -6,7 +6,8 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$CountryCode, [string]$ZipCode)
|
||||
param([string]$CountryCode = "", [string]$ZipCode = "")
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
if ($CountryCode -eq "" ) {
|
||||
@ -17,7 +18,6 @@ try {
|
||||
}
|
||||
|
||||
write-progress "Reading zip-codes.csv..."
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/zip-codes.csv"
|
||||
|
||||
$FoundOne = 0
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$EmailAddress)
|
||||
param([string]$EmailAddress = "")
|
||||
|
||||
try {
|
||||
if ($EmailAddress -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$URL)
|
||||
param([string]$URL = "")
|
||||
|
||||
try {
|
||||
if ($URL -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Pattern, [string]$Path)
|
||||
param([string]$Pattern = "", [string]$Path = "")
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$TargetIP, [int]$TargetPort, [string]$Message)
|
||||
param([string]$TargetIP = "", [int]$TargetPort = 0, [string]$Message = "")
|
||||
|
||||
try {
|
||||
if ($TargetIP -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$TargetIP, [int]$TargetPort, [string]$Message)
|
||||
param([string]$TargetIP = "", [int]$TargetPort = 0, [string]$Message = "")
|
||||
|
||||
try {
|
||||
if ($TargetIP -eq "" ) {
|
||||
|
@ -6,7 +6,8 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([int]$Seconds)
|
||||
param([int]$Seconds = 0)
|
||||
|
||||
try {
|
||||
if ($Seconds -eq 0 ) {
|
||||
[int]$Seconds = read-host "Enter number of seconds"
|
||||
|
@ -6,9 +6,10 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
write-progress "Reading Data/matrix.csv..."
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/matrix.csv"
|
||||
|
||||
clear-host
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$File)
|
||||
param([string]$File = "")
|
||||
|
||||
try {
|
||||
if ($File -eq "") {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text)
|
||||
param([string]$Text = "")
|
||||
|
||||
try {
|
||||
if ($Text -eq "") {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$IPaddr, [string]$TurnMode, [int]$Timer = -999)
|
||||
param([string]$IPaddr = "", [string]$TurnMode = "", [int]$Timer = -999)
|
||||
|
||||
try {
|
||||
if ($IPaddr -eq "") {
|
||||
|
@ -7,12 +7,13 @@
|
||||
#>
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
$StartTime = Get-Date
|
||||
|
||||
write-progress "Reading Data/domain-names.csv..."
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
$Table = import-csv "$PathToRepo/Data/domain-names.csv"
|
||||
|
||||
foreach($Row in $Table) {
|
||||
|
@ -6,7 +6,9 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$SourceFile, [string]$SourceLanguage, [string]$TargetLanguage)
|
||||
param([string]$SourceFile = "", [string]$SourceLanguage = "", [string]$TargetLanguage = "")
|
||||
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
try {
|
||||
if ($SourceFile -eq "" ) {
|
||||
@ -19,8 +21,6 @@ try {
|
||||
$TargetLanguage = read-host "Enter language to translate to"
|
||||
}
|
||||
|
||||
$PathToRepo=(get-item $MyInvocation.MyCommand.Path).directory.parent
|
||||
|
||||
Start-Process -FilePath "$PathToRepo/Data/trans" -ArgumentList "-i $SourceFile -s $SourceLanguage -t $TargetLanguage -e google -brief" -NoNewWindow -Wait
|
||||
exit 0
|
||||
} catch {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$SourceText, [string]$SourceLang = "en")
|
||||
param([string]$SourceText = "", [string]$SourceLang = "en")
|
||||
|
||||
if ($SourceText -eq "" ) {
|
||||
$SourceText = read-host "Enter text to translate"
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Hostname)
|
||||
param([string]$Hostname = "")
|
||||
if ($Hostname -eq "" ) {
|
||||
$Hostname = read-host "Enter hostname"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text)
|
||||
param([string]$Text = "")
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text)
|
||||
param([string]$Text = "")
|
||||
|
||||
try {
|
||||
if ($Text -eq "" ) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text)
|
||||
param([string]$Text = "")
|
||||
|
||||
function BrailleA() { param([int]$Row)
|
||||
switch($Row) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text, [int]$OneTimeUnit = 100) # in milliseconds
|
||||
param([string]$Text = "", [int]$OneTimeUnit = 100) # in milliseconds
|
||||
|
||||
function gap() { param([int]$Length)
|
||||
for ([int]$i = 1; $i -lt $Length; $i++) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text)
|
||||
param([string]$Text = "")
|
||||
|
||||
function ROT13 { param([string]$Text)
|
||||
$Text.ToCharArray() | ForEach-Object {
|
||||
|
@ -6,7 +6,7 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Path)
|
||||
param([string]$Path = "")
|
||||
|
||||
try {
|
||||
if ($Path -eq "" ) {
|
||||
|
Loading…
Reference in New Issue
Block a user