PowerShell/scripts/introduce-powershell.ps1

59 lines
2.5 KiB
PowerShell
Raw Normal View History

2023-10-31 12:20:46 +01:00
<#
2021-07-13 21:10:02 +02:00
.SYNOPSIS
2023-10-06 11:20:43 +02:00
Introducing PowerShell
2021-10-04 21:29:23 +02:00
.DESCRIPTION
2023-10-06 11:20:43 +02:00
This PowerShell script introduces PowerShell to new users and gives an overview of it.
2021-07-13 21:10:02 +02:00
.EXAMPLE
2023-08-06 21:35:36 +02:00
PS> ./introduce-powershell.ps1
2021-07-13 21:10:02 +02:00
.LINK
https://github.com/fleschutz/PowerShell
2022-01-29 12:47:46 +01:00
.NOTES
2022-09-06 21:42:04 +02:00
Author: Markus Fleschutz | License: CC0
#>
try {
2022-12-22 17:13:53 +01:00
Clear-Host
""
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" " There's one shell to rule them all. It's called:" 200
2022-12-22 17:13:53 +01:00
""
2023-08-11 09:49:33 +02:00
Write-Host " _____ _____ _ _ _ " -foregroundColor blue
Write-Host " | __ \ / ____| | | | |" -foregroundColor blue
Write-Host " | |__) |____ _____ _ _| (___ | |__ ___| | |" -foregroundColor blue
Write-Host " | ___/ _ \ \ /\ / / _ \ '__\___ \| '_ \ / _ \ | |" -foregroundColor blue
Write-Host " | | | (_) \ V V / __/ | ____) | | | | __/ | |" -foregroundColor blue
Write-Host " |_| \___/ \_/\_/ \___|_| |_____/|_| |_|\___|_|_|" -foregroundColor blue
2022-12-22 17:13:53 +01:00
""
2022-12-02 09:07:18 +01:00
""
2023-10-06 11:20:43 +02:00
$version = $PSVersionTable.PSVersion
$edition = $PSVersionTable.PSEdition
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Welcome to PowerShell $version $edition edition" 25
2023-08-10 08:26:03 +02:00
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "PowerShell is open-source and free! It's available for Linux, Mac OS and Windows" 25
2023-08-10 08:26:03 +02:00
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Want to learn PowerShell? See the tutorial at: https://www.guru99.com/powershell-tutorial.html" 25
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2022-12-23 07:32:38 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-08-10 08:26:03 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Want sample scripts? See the Mega Collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25
2023-08-09 16:52:46 +02:00
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-10-31 11:05:01 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "Want a cheat sheet? See: https://github.com/fleschutz/PowerShell/blob/master/docs/cheat-sheet.md" 25
2023-10-06 11:20:43 +02:00
""
Write-Host " 🔷 " -noNewline
2023-10-31 11:05:01 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/docs/FAQ.md" 25
""
2023-08-11 09:49:33 +02:00
Write-Host " 🔷 " -noNewline
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Want to support and donate? Just follow: https://www.paypal.com/paypalme/Fleschutz" 25
""
2023-10-06 11:20:43 +02:00
& "$PSScriptRoot/write-typewriter.ps1" " NOTE: Use <Ctrl> + <Click> to open the links above in your browser" 100
2021-09-27 10:09:45 +02:00
exit 0 # success
} catch {
2022-04-13 12:06:32 +02:00
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
2023-08-06 21:35:36 +02:00
}