2021-09-27 10:38:12 +02:00
|
|
|
|
<#
|
2021-07-13 21:10:02 +02:00
|
|
|
|
.SYNOPSIS
|
2021-09-24 17:19:49 +02:00
|
|
|
|
Introduces PowerShell to new users
|
2021-10-04 21:29:23 +02:00
|
|
|
|
.DESCRIPTION
|
2022-01-29 12:47:46 +01:00
|
|
|
|
This PowerShell script introduces PowerShell to new users.
|
2021-07-13 21:10:02 +02:00
|
|
|
|
.EXAMPLE
|
2021-09-24 17:19:49 +02:00
|
|
|
|
PS> ./introduce-powershell
|
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
|
2021-03-29 19:26:42 +02:00
|
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
try {
|
2022-12-02 09:07:18 +01:00
|
|
|
|
Clear
|
|
|
|
|
& "$PSScriptRoot/write-big.ps1" " WELCOME"
|
|
|
|
|
""
|
|
|
|
|
$Version = $PSVersionTable.PSVersion
|
|
|
|
|
$Edition = $PSVersionTable.PSEdition
|
|
|
|
|
$NumModules = (Get-Module).Count
|
|
|
|
|
$NumCmdlets = (Get-Command -Command-Type cmdlet).Count
|
|
|
|
|
$NumAliases = (Get-Alias).Count
|
|
|
|
|
$Details = "to POWERSHELL $Version ($Edition edition) with $NumModules modules, $NumCmdlets cmdlets and $NumAliases aliases"
|
|
|
|
|
& "$PSScriptRoot/write-animated.ps1" "$Details"
|
|
|
|
|
""
|
|
|
|
|
""
|
|
|
|
|
& "$PSScriptRoot/write-typewriter.ps1" "* Want to learn PowerShell? See the tutorials at: https://www.guru99.com/powershell-tutorial.html" 25
|
2021-03-29 19:26:42 +02:00
|
|
|
|
""
|
2022-12-02 09:07:18 +01:00
|
|
|
|
& "$PSScriptRoot/write-typewriter.ps1" "* Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
|
2021-03-29 19:26:42 +02:00
|
|
|
|
""
|
2022-12-02 09:07:18 +01:00
|
|
|
|
& "$PSScriptRoot/write-typewriter.ps1" "* Want to look inside? See the PowerShell Github repository at: https://github.com/PowerShell/PowerShell" 25
|
2021-03-29 19:26:42 +02:00
|
|
|
|
""
|
2022-12-02 09:07:18 +01:00
|
|
|
|
& "$PSScriptRoot/write-typewriter.ps1" "* Want examples? See the huge collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25
|
2021-03-29 19:26:42 +02:00
|
|
|
|
""
|
|
|
|
|
|
2022-12-02 09:07:18 +01:00
|
|
|
|
& "$PSScriptRoot/write-typewriter.ps1" "NOTE: use <Ctrl> + <Click> to follow the links above and HAVE FUN!" 20
|
2021-03-29 19:26:42 +02:00
|
|
|
|
""
|
|
|
|
|
|
2021-09-27 10:09:45 +02:00
|
|
|
|
exit 0 # success
|
2021-03-29 19:26:42 +02:00
|
|
|
|
} catch {
|
2022-04-13 12:06:32 +02:00
|
|
|
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
2021-03-29 19:26:42 +02:00
|
|
|
|
exit 1
|
|
|
|
|
}
|