mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-23 10:28:23 +02:00
Update descriptions
This commit is contained in:
parent
9a1bdd9ac5
commit
9748042e05
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
take-screenshot.ps1 [<directory>]
|
take-screenshot.ps1 [<directory>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Takes a single screenshot and saves it into the current/given directory.
|
Takes a single screenshot and saves it into the current/given directory
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\take-screenshot.ps1 C:\Temp
|
PS> ./take-screenshot C:\Temp
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
take-screenshots.ps1 [<directory>] [<interval>]
|
take-screenshots.ps1 [<TargetDir>] [<Interval>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Takes screenshots every 60 seconds and saves them into the current/given directory.
|
Takes screenshots and saves them into a target directory (per default every 60 seconds)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\take-screenshots.ps1 C:\Temp 60
|
PS> ./take-screenshots C:\Temp 60
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Directory = "$PWD", [int]$Interval = 60)
|
param([string]$TargetDir = "$PWD", [int]$Interval = 60) # in seconds
|
||||||
|
|
||||||
function TakeScreenshot { param([string]$FilePath)
|
function TakeScreenshot { param([string]$FilePath)
|
||||||
Add-Type -Assembly System.Windows.Forms
|
Add-Type -Assembly System.Windows.Forms
|
||||||
@ -28,7 +28,7 @@ try {
|
|||||||
do {
|
do {
|
||||||
$Time = (Get-Date)
|
$Time = (Get-Date)
|
||||||
$Filename = "$($Time.Year)-$($Time.Month)-$($Time.Day)-$($Time.Hour)-$($Time.Minute)-$($Time.Second).png"
|
$Filename = "$($Time.Year)-$($Time.Month)-$($Time.Day)-$($Time.Hour)-$($Time.Minute)-$($Time.Second).png"
|
||||||
$FilePath = (Join-Path $Directory $Filename)
|
$FilePath = (Join-Path $TargetDir $Filename)
|
||||||
|
|
||||||
write-output "Saving screenshot to $FilePath..."
|
write-output "Saving screenshot to $FilePath..."
|
||||||
TakeScreenshot $FilePath
|
TakeScreenshot $FilePath
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
translate-file.ps1 [<file>] [<source-lang>] [<target-lang>]
|
translate-file.ps1 [<file>] [<source-lang>] [<target-lang>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Translates the given text file into another language and prints the result.
|
Translates the given text file into another language and prints the result
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\translate-file.ps1 C:\Memo.txt en de
|
PS> ./translate-file C:\Memo.txt en de
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
translate-files.ps1 [<file-pattern>]
|
translate-files.ps1 [<file-pattern>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Translates the given text files into any supported language.
|
Translates the given text files into any supported language
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\translate-files.ps1 C:\Temp\*.txt
|
PS> ./translate-files C:\Temp\*.txt
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
translate-text.ps1 [<text>] [<source-lang>] [<target-lang>]
|
translate-text.ps1 [<text>] [<source-lang>] [<target-lang>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Translates the given text into other languages.
|
Translates the given text into other languages
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\translate-text.ps1 "Hello World" de en
|
PS> ./translate-text "Hello World" de en
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
turn-volume-down.ps1 [<percent>]
|
turn-volume-down.ps1 [<percent>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Turns the audio volume down (-10% by default).
|
Turns the audio volume down (-10% by default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./turn-volume-down
|
PS> ./turn-volume-down
|
||||||
.NOTES
|
.NOTES
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
wakeup.ps1 [<MAC-address>] [<IP-address>]
|
wakeup.ps1 [<MAC-address>] [<IP-address>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Sends a magic packet to a computer to wake him up (requires Wake-On-LAN).
|
Sends a magic packet to a computer to wake him up (requires Wake-On-LAN)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\wakeup.ps1 11:22:33:44:55:66 192.168.100.100
|
PS> ./wakeup 11:22:33:44:55:66 192.168.100.100
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
weather-report.ps1 [<geo-location>]
|
weather-report.ps1 [<GeoLocation>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Prints the local weather report.
|
Prints the local weather report
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\weather-report.ps1 Paris
|
PS> ./weather-report Paris
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
weather.ps1 [<geo-location>]
|
weather.ps1 [<GeoLocation>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Prints the current weather forecast.
|
Prints the current weather forecast
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\weather.ps1 Paris
|
PS> ./weather Paris
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Prints a description of the given abbreviation.
|
Prints a description of the given abbreviation.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\what-is.ps1 CIA
|
PS> ./what-is CIA
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-animated.ps1 [<line1>] .. [line9>] [<speed>]
|
write-animated.ps1 [<line1>] .. [line9>] [<speed>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes animated text.
|
Writes animated text
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-animated.ps1 "Hello World"
|
PS> ./write-animated "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-big.ps1 [<text>]
|
write-big.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in big letters.
|
Writes the given text in big letters
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-big.ps1 "Hello World"
|
PS> ./write-big "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "")
|
param([string]$text = "")
|
||||||
|
|
||||||
Set-StrictMode -Version Latest
|
Set-StrictMode -Version Latest
|
||||||
|
|
||||||
@ -402,9 +402,9 @@ function BigChar { param([string]$Char, [int]$Row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($Text -eq "" ) { [String]$Text = read-host "Enter text to write" }
|
if ($text -eq "" ) { [String]$text = read-host "Enter text to write" }
|
||||||
|
|
||||||
[char[]]$ArrayOfChars = $Text.ToUpper()
|
[char[]]$ArrayOfChars = $text.ToUpper()
|
||||||
write-output ""
|
write-output ""
|
||||||
for ($Row = 1; $Row -lt 5; $Row++) {
|
for ($Row = 1; $Row -lt 5; $Row++) {
|
||||||
$Line = ""
|
$Line = ""
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-blue.ps1 [<text>]
|
write-blue.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in a blue foreground color.
|
Writes the given text in a blue foreground color
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-blue.ps1 "Hello World"
|
PS> ./write-blue "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-braille.ps1 [<text>]
|
write-braille.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in Braille.
|
Writes the given text in Braille
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-braille.ps1 "Hello World"
|
PS> ./write-braille "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "")
|
param([string]$text = "")
|
||||||
|
|
||||||
function BrailleA { param([int]$Row)
|
function BrailleA { param([int]$Row)
|
||||||
switch($Row) {
|
switch($Row) {
|
||||||
@ -344,10 +344,9 @@ function BrailleChar { param([string]$Char, [int]$Row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($Text -eq "" ) {
|
if ($text -eq "" ) { $text = read-host "Enter text to write" }
|
||||||
[String]$Text = read-host "Enter text to write"
|
|
||||||
}
|
[char[]]$ArrayOfChars = $text.ToUpper()
|
||||||
[char[]]$ArrayOfChars = $Text.ToUpper()
|
|
||||||
write-output ""
|
write-output ""
|
||||||
for ($Row = 1; $Row -lt 4; $Row++) {
|
for ($Row = 1; $Row -lt 4; $Row++) {
|
||||||
$Line = ""
|
$Line = ""
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
.PARAMETER Year
|
.PARAMETER Year
|
||||||
If specified, will output an entire year.
|
If specified, will output an entire year.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> write-calendar
|
PS> ./write-calendar
|
||||||
Outputs the current month.
|
Outputs the current month.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> write-calendar 2013
|
PS> ./write-calendar 2013
|
||||||
Outputs the calendar for 2013.
|
Outputs the calendar for 2013.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> write-calendar 04 2011
|
PS> ./write-calendar 04 2011
|
||||||
Outputs the calendar for April, 2011.
|
Outputs the calendar for April, 2011.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> write-calendar 7
|
PS> ./write-calendar 7
|
||||||
Outputs the calendar for July of this year.
|
Outputs the calendar for July of this year.
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-chart.ps1
|
write-chart.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes a chart.
|
Writes a chart
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-chart.ps1
|
PS> ./write-chart
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-green.ps1 [<text>]
|
write-green.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in a green foreground color.
|
Writes the given text in a green foreground color
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-green.ps1 "Hello World"
|
PS> ./write-green "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-joke.ps1
|
write-joke.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes a random Juck Norris joke to the console.
|
Writes a random Juck Norris joke to the console
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-joke.ps1
|
PS> ./write-joke
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-lowercase.ps1 [<text>]
|
write-lowercase.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in lowercase letters.
|
Writes the given text in lowercase letters
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-lowercase.ps1 "Hello World"
|
PS> ./write-lowercase "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-marquee.ps1 [<text>] [<speed>]
|
write-marquee.ps1 [<text>] [<speed>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text as marquee.
|
Writes the given text as marquee
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-marquee.ps1 "Hello World"
|
PS> ./write-marquee "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "PowerShell is powerful! PowerShell is cross-platform! PowerShell is open-source! PowerShell is easy to learn! Powershell is fully documented", [int]$Speed = 60) # 60 ms pause
|
param([string]$text = "PowerShell is powerful! PowerShell is cross-platform! PowerShell is open-source! PowerShell is easy to learn! Powershell is fully documented", [int]$speed = 60) # 60 ms pause
|
||||||
|
|
||||||
function StartMarquee { param([string]$text)
|
function StartMarquee { param([string]$text)
|
||||||
$Length = $text.Length
|
$Length = $text.Length
|
||||||
@ -30,12 +30,12 @@ function StartMarquee { param([string]$text)
|
|||||||
$HOST.UI.RawUI.CursorPosition = $StartPosition
|
$HOST.UI.RawUI.CursorPosition = $StartPosition
|
||||||
$TextToDisplay = $text.Substring($Pos, 80)
|
$TextToDisplay = $text.Substring($Pos, 80)
|
||||||
write-host -nonewline $TextToDisplay
|
write-host -nonewline $TextToDisplay
|
||||||
start-sleep -milliseconds $Speed
|
start-sleep -milliseconds $speed
|
||||||
}
|
}
|
||||||
write-output ""
|
write-output ""
|
||||||
write-output ""
|
write-output ""
|
||||||
write-output ""
|
write-output ""
|
||||||
}
|
}
|
||||||
|
|
||||||
StartMarquee " +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ "
|
StartMarquee " +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ "
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -2,32 +2,32 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-morse-code.ps1 [<text>] [<speed>]
|
write-morse-code.ps1 [<text>] [<speed>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in Morse code.
|
Writes the given text in Morse code
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-morse-code.ps1 "Hello World"
|
PS> ./write-morse-code "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "", [int]$OneTimeUnit = 100) # in milliseconds
|
param([string]$text = "", [int]$speed = 100) # one time unit in milliseconds
|
||||||
|
|
||||||
function gap { param([int]$Length)
|
function gap { param([int]$Length)
|
||||||
for ([int]$i = 1; $i -lt $Length; $i++) {
|
for ([int]$i = 1; $i -lt $Length; $i++) {
|
||||||
write-host " " -nonewline
|
write-host " " -nonewline
|
||||||
}
|
}
|
||||||
start-sleep -milliseconds ($Length * $OneTimeUnit)
|
start-sleep -milliseconds ($Length * $speed)
|
||||||
}
|
}
|
||||||
|
|
||||||
function dot {
|
function dot {
|
||||||
write-host "." -nonewline
|
write-host "." -nonewline
|
||||||
start-sleep -milliseconds $OneTimeUnit # signal
|
start-sleep -milliseconds $speed # signal
|
||||||
}
|
}
|
||||||
|
|
||||||
function dash {
|
function dash {
|
||||||
write-host "_" -nonewline
|
write-host "_" -nonewline
|
||||||
start-sleep -milliseconds (3 * $OneTimeUnit) # signal
|
start-sleep -milliseconds (3 * $speed) # signal
|
||||||
}
|
}
|
||||||
|
|
||||||
function Char2MorseCode { param([string]$Char)
|
function Char2MorseCode { param([string]$Char)
|
||||||
@ -73,9 +73,9 @@ function Char2MorseCode { param([string]$Char)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($Text -eq "" ) { [string]$Text = read-host "Enter text to write" }
|
if ($text -eq "" ) { [string]$text = read-host "Enter text to write" }
|
||||||
|
|
||||||
[char[]]$ArrayOfChars = $Text.ToUpper()
|
[char[]]$ArrayOfChars = $text.ToUpper()
|
||||||
foreach($Char in $ArrayOfChars) {
|
foreach($Char in $ArrayOfChars) {
|
||||||
Char2MorseCode $Char
|
Char2MorseCode $Char
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-motd.ps1
|
write-motd.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the message of the day (MOTD).
|
Writes the message of the day (MOTD)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-motd.ps1
|
PS> ./write-motd
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-quote.ps1
|
write-quote.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes a random quote to the console.
|
Writes a random quote to the console
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-quote.ps1
|
PS> ./write-quote
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-red.ps1 [<text>]
|
write-red.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in a red foreground color.
|
Writes the given text in a red foreground color
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-red.ps1 "Hello World"
|
PS> ./write-red "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-rot13.ps1 [<text>]
|
write-rot13.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Prints the given text encoded or decoded with ROT13.
|
Writes the given text encoded or decoded with ROT13
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-rot13.ps1 "Hello World"
|
PS> ./write-rot13 "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,23 +2,23 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-typewriter.ps1 [<text>] [<speed>]
|
write-typewriter.ps1 [<text>] [<speed>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text with the typewriter effect.
|
Writes the given text with the typewriter effect
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-typewriter.ps1 "Hello World"
|
PS> ./write-typewriter "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n", [int]$Speed = 250) # in milliseconds
|
param([string]$text = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n", [int]$speed = 250) # in milliseconds
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Random = New-Object System.Random
|
$Random = New-Object System.Random
|
||||||
|
|
||||||
$Text -split '' | ForEach-Object {
|
$text -split '' | ForEach-Object {
|
||||||
write-host -nonewline $_
|
write-host -nonewline $_
|
||||||
start-sleep -milliseconds $(1 + $Random.Next($Speed))
|
start-sleep -milliseconds $(1 + $Random.Next($speed))
|
||||||
}
|
}
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-uppercase.ps1 [<text>]
|
write-uppercase.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in uppercase letters.
|
Writes the given text in uppercase letters
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-uppercase.ps1 "Hello World"
|
PS> ./write-uppercase "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
write-vertical.ps1 [<text>]
|
write-vertical.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Writes the given text in vertical direction.
|
Writes the given text in vertical direction
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\write-vertical.ps1 "Hello World"
|
PS> ./write-vertical "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
Loading…
Reference in New Issue
Block a user