PowerShell/Docs/introduce-powershell.md

74 lines
2.2 KiB
Markdown
Raw Normal View History

2022-12-04 10:40:18 +01:00
## The *introduce-powershell.ps1* Script
2021-11-08 21:36:42 +01:00
2022-02-10 09:01:07 +01:00
This PowerShell script introduces PowerShell to new users.
2021-11-08 21:36:42 +01:00
## Parameters
```powershell
2021-12-09 16:19:09 +01:00
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.
```
## Example
```powershell
PS> ./introduce-powershell
```
## Notes
2022-11-17 19:46:02 +01:00
Author: Markus Fleschutz | License: CC0
2021-11-08 21:36:42 +01:00
## Related Links
https://github.com/fleschutz/PowerShell
2022-11-17 20:02:26 +01:00
## Source Code
2022-11-17 20:05:34 +01:00
```powershell
2022-11-17 20:02:26 +01:00
<#
.SYNOPSIS
Introduces PowerShell to new users
.DESCRIPTION
This PowerShell script introduces PowerShell to new users.
.EXAMPLE
PS> ./introduce-powershell
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
2022-12-04 10:40: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
2022-11-17 20:02:26 +01:00
""
2022-12-04 10:40:18 +01: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
""
2022-12-04 10:40:18 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "* Want to look inside? See the PowerShell Github repository at: https://github.com/PowerShell/PowerShell" 25
2022-11-17 20:02:26 +01:00
""
2022-12-04 10:40:18 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "* Want examples? See the huge collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25
2022-11-17 20:02:26 +01:00
""
2022-12-04 10:40:18 +01:00
& "$PSScriptRoot/write-typewriter.ps1" "NOTE: use <Ctrl> + <Click> to follow the links above and HAVE FUN!" 20
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
2021-11-08 21:36:42 +01:00
*Generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1*