-
-
Notifications
You must be signed in to change notification settings - Fork 423
/
introduce-powershell.ps1
executable file
·59 lines (57 loc) · 2.53 KB
/
introduce-powershell.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<#
.SYNOPSIS
Introducing PowerShell
.DESCRIPTION
This PowerShell script introduces PowerShell to new users and gives an overview of it.
.EXAMPLE
PS> ./introduce-powershell.ps1
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
Clear-Host
""
& "$PSScriptRoot/write-typewriter.ps1" " Hi $USERNAME, move into the fast lane by using . . ." 200
""
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
""
""
$version = $PSVersionTable.PSVersion
$edition = $PSVersionTable.PSEdition
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Welcome to PowerShell $version $edition edition" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "PowerShell is open-source and free! It's available for Linux, Mac OS and Windows" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Enhance PowerShell by 500+ PowerShell scripts! Get them from: https://github.com/fleschutz/PowerShell" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Want to learn PowerShell? See the tutorial at: https://www.guru99.com/powershell-tutorial.html" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Want a cheat sheet? See: https://github.com/fleschutz/PowerShell/blob/master/docs/cheat-sheet.md" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/docs/FAQ.md" 25
""
Write-Host " 🔷 " -noNewline
& "$PSScriptRoot/write-typewriter.ps1" "Want to support and donate? Just follow: https://www.paypal.com/paypalme/Fleschutz" 25
""
& "$PSScriptRoot/write-typewriter.ps1" " NOTE: Use <Ctrl> + <Click> to open the links above in your browser" 100
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}