2024-11-08 12:38:20 +01:00
|
|
|
The *write-hands-off.ps1* Script
|
|
|
|
===========================
|
2024-11-08 12:35:11 +01:00
|
|
|
|
|
|
|
This PowerShell script writes 'Hands Off' in BIG letters.
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
----------
|
|
|
|
```powershell
|
|
|
|
/home/markus/Repos/PowerShell/scripts/write-hands-off.ps1 [<CommonParameters>]
|
|
|
|
|
|
|
|
[<CommonParameters>]
|
|
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
|
|
```
|
|
|
|
|
|
|
|
Example
|
|
|
|
-------
|
|
|
|
```powershell
|
|
|
|
PS> ./write-hands-off.ps1
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Notes
|
|
|
|
-----
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
|
|
|
|
Related Links
|
|
|
|
-------------
|
|
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
|
|
|
|
Script Content
|
|
|
|
--------------
|
|
|
|
```powershell
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
|
|
Writes 'Hands Off'
|
|
|
|
.DESCRIPTION
|
|
|
|
This PowerShell script writes 'Hands Off' in BIG letters.
|
|
|
|
.EXAMPLE
|
|
|
|
PS> ./write-hands-off.ps1
|
|
|
|
.LINK
|
|
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
.NOTES
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
#>
|
|
|
|
|
|
|
|
try {
|
|
|
|
$randomNumberGenerator = New-Object System.Random
|
|
|
|
while ($true) {
|
|
|
|
Clear-Host
|
|
|
|
Write-Host "`n`n"
|
|
|
|
& "$PSScriptRoot/write-big.ps1" " HANDS OFF"
|
|
|
|
Write-Host "`n`n"
|
|
|
|
& "$PSScriptRoot/write-big.ps1" " DO NOT TOUCH"
|
|
|
|
Write-Host "`n`n"
|
|
|
|
& "$PSScriptRoot/write-big.ps1" " MY PC"
|
|
|
|
[int]$x = $randomNumberGenerator.next(1, 90)
|
|
|
|
[int]$y = $randomNumberGenerator.next(1, 22)
|
|
|
|
[System.Console]::SetCursorPosition($x, $y)
|
|
|
|
Write-Host "🔥🔥🔥 LAST WARNING 🔥🔥🔥" -foregroundColor red
|
|
|
|
Start-Sleep -milliseconds 900
|
|
|
|
}
|
|
|
|
exit 0 # success
|
|
|
|
} catch {
|
|
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-11-08 12:40:31 +01:00
|
|
|
*(generated by convert-ps2md.ps1 as of 11/08/2024 12:40:23)*
|