PowerShell/docs/introduce-powershell.md

96 lines
3.3 KiB
Markdown
Raw Normal View History

2024-01-25 13:37:12 +01:00
Script: *introduce-powershell.ps1*
========================
2021-11-08 21:36:42 +01:00
2023-10-19 08:12:00 +02:00
This PowerShell script introduces PowerShell to new users and gives an overview of it.
2021-11-08 21:36:42 +01:00
2023-07-29 10:04:38 +02:00
Parameters
----------
2021-11-08 21:36:42 +01:00
```powershell
2023-07-29 10:15:44 +02:00
PS> ./introduce-powershell.ps1 [<CommonParameters>]
2021-11-08 21:36:42 +01:00
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
```
2023-07-29 10:04:38 +02:00
Example
-------
2021-11-08 21:36:42 +01:00
```powershell
2023-08-06 21:36:33 +02:00
PS> ./introduce-powershell.ps1
2021-11-08 21:36:42 +01:00
```
2023-07-29 10:04:38 +02:00
Notes
-----
2022-11-17 19:46:02 +01:00
Author: Markus Fleschutz | License: CC0
2021-11-08 21:36:42 +01:00
2023-07-29 10:04:38 +02:00
Related Links
-------------
2021-11-08 21:36:42 +01:00
https://github.com/fleschutz/PowerShell
2023-07-29 10:04:38 +02:00
Script Content
--------------
2022-11-17 20:05:34 +01:00
```powershell
2022-11-17 20:02:26 +01:00
<#
.SYNOPSIS
2023-10-19 08:12:00 +02:00
Introducing PowerShell
2022-11-17 20:02:26 +01:00
.DESCRIPTION
2023-10-19 08:12:00 +02:00
This PowerShell script introduces PowerShell to new users and gives an overview of it.
2022-11-17 20:02:26 +01:00
.EXAMPLE
2023-08-06 21:36:33 +02:00
PS> ./introduce-powershell.ps1
2022-11-17 20:02:26 +01:00
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
2023-05-26 12:20:18 +02:00
Clear-Host
""
2024-05-19 10:25:56 +02:00
& "$PSScriptRoot/write-typewriter.ps1" " Hi $USERNAME, move into the fast lane by using . . ." 200
2023-05-26 12:20:18 +02:00
""
2023-09-01 17:53:03 +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
2023-05-26 12:20:18 +02:00
""
2022-12-04 10:40:18 +01:00
""
2023-10-19 08:12:00 +02:00
$version = $PSVersionTable.PSVersion
$edition = $PSVersionTable.PSEdition
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2023-10-19 08:12:00 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Welcome to PowerShell $version $edition edition" 25
2023-09-01 17:53:03 +02:00
""
Write-Host " 🔷 " -noNewline
2023-10-19 08:12:00 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "PowerShell is open-source and free! It's available for Linux, Mac OS and Windows" 25
2022-12-04 10:40:18 +01:00
""
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2024-05-19 10:25:56 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Enhance PowerShell by 500+ PowerShell scripts! Get them from: https://github.com/fleschutz/PowerShell" 25
2022-11-17 20:02:26 +01:00
""
2024-05-19 10:25:56 +02:00
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2024-05-19 10:25:56 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Want to learn PowerShell? See the tutorial at: https://www.guru99.com/powershell-tutorial.html" 25
2022-11-17 20:02:26 +01:00
""
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2024-05-19 10:25:56 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Need docs? See the official documentation at: https://docs.microsoft.com/en-us/powershell" 25
2022-11-17 20:02:26 +01:00
""
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2023-12-07 20:24:45 +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-19 08:12:00 +02:00
""
Write-Host " 🔷 " -noNewline
2023-12-07 20:24:45 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/docs/FAQ.md" 25
2022-11-17 20:02:26 +01:00
""
2023-09-01 17:53:03 +02:00
Write-Host " 🔷 " -noNewline
2023-10-19 08:12:00 +02:00
& "$PSScriptRoot/write-typewriter.ps1" "Want to support and donate? Just follow: https://www.paypal.com/paypalme/Fleschutz" 25
2022-11-17 20:02:26 +01:00
""
2023-10-19 08:12:00 +02:00
& "$PSScriptRoot/write-typewriter.ps1" " NOTE: Use <Ctrl> + <Click> to open the links above in your browser" 100
2022-11-17 20:02:26 +01:00
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
2022-11-17 20:05:34 +01:00
```
2022-11-17 20:02:26 +01:00
2024-08-15 09:51:46 +02:00
*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 08/15/2024 09:50:48)*