mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
Update introduce-powershell.ps1
This commit is contained in:
parent
ccf88b966d
commit
bb3419f6fa
@ -1,8 +1,8 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Introduces PowerShell to new users
|
Introducing PowerShell
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script introduces PowerShell to new users.
|
This PowerShell script introduces PowerShell to new users and gives an overview of it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./introduce-powershell.ps1
|
PS> ./introduce-powershell.ps1
|
||||||
.LINK
|
.LINK
|
||||||
@ -14,7 +14,7 @@
|
|||||||
try {
|
try {
|
||||||
Clear-Host
|
Clear-Host
|
||||||
""
|
""
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" " There is one shell to rule them all:" 200
|
& "$PSScriptRoot/write-typewriter.ps1" " There's one shell to rule them all. It's called:" 200
|
||||||
""
|
""
|
||||||
Write-Host " _____ _____ _ _ _ " -foregroundColor blue
|
Write-Host " _____ _____ _ _ _ " -foregroundColor blue
|
||||||
Write-Host " | __ \ / ____| | | | |" -foregroundColor blue
|
Write-Host " | __ \ / ____| | | | |" -foregroundColor blue
|
||||||
@ -24,22 +24,16 @@ try {
|
|||||||
Write-Host " |_| \___/ \_/\_/ \___|_| |_____/|_| |_|\___|_|_|" -foregroundColor blue
|
Write-Host " |_| \___/ \_/\_/ \___|_| |_____/|_| |_|\___|_|_|" -foregroundColor blue
|
||||||
""
|
""
|
||||||
""
|
""
|
||||||
$Version = $PSVersionTable.PSVersion
|
$version = $PSVersionTable.PSVersion
|
||||||
$Edition = $PSVersionTable.PSEdition
|
$edition = $PSVersionTable.PSEdition
|
||||||
$NumModules = (Get-Module).Count
|
|
||||||
$NumAliases = (Get-Alias).Count
|
|
||||||
$Details = "PowerShell $Version ($Edition edition) with $NumModules modules and $NumAliases aliases."
|
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "Welcome to $Details" 25
|
& "$PSScriptRoot/write-typewriter.ps1" "Welcome to PowerShell $version $edition edition" 25
|
||||||
""
|
""
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "PowerShell is open-source and free! It's available for Linux, Mac OS and Windows." 25
|
& "$PSScriptRoot/write-typewriter.ps1" "PowerShell is open-source and free! It's available for Linux, Mac OS and Windows" 25
|
||||||
""
|
""
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "Curious? Take a look under the hood at: https://github.com/PowerShell/PowerShell" 25
|
& "$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" "Want to learn PowerShell? See the tutorials at: https://www.guru99.com/powershell-tutorial.html" 25
|
|
||||||
""
|
""
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
|
& "$PSScriptRoot/write-typewriter.ps1" "Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
|
||||||
@ -48,12 +42,15 @@ try {
|
|||||||
& "$PSScriptRoot/write-typewriter.ps1" "Want sample scripts? See the Mega Collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25
|
& "$PSScriptRoot/write-typewriter.ps1" "Want sample scripts? See the Mega Collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25
|
||||||
""
|
""
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "Want to donate? Great, just follow this link: https://www.paypal.com/paypalme/Fleschutz" 25
|
& "$PSScriptRoot/write-typewriter.ps1" "Want a cheat sheet? See: https://github.com/fleschutz/PowerShell/blob/master/Docs/cheat-sheet.md" 25
|
||||||
""
|
""
|
||||||
Write-Host " 🔷 " -noNewline
|
Write-Host " 🔷 " -noNewline
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" "Any questions? See the PowerShell FAQ at: https://github.com/fleschutz/PowerShell/blob/master/Docs/FAQ.md" 25
|
& "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/Docs/FAQ.md" 25
|
||||||
""
|
""
|
||||||
& "$PSScriptRoot/write-typewriter.ps1" " (use <Ctrl> + <Click> to open the links above in your browser)" 100
|
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
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user