2022-11-18 17:02:20 +01:00
|
|
|
## The *list-cheat-sheet.ps1* PowerShell Script
|
2021-11-08 21:36:42 +01:00
|
|
|
|
2022-02-10 09:01:07 +01:00
|
|
|
This PowerShell script lists the PowerShell cheat sheet.
|
2021-11-08 21:36:42 +01:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
```powershell
|
2021-12-09 16:19:09 +01:00
|
|
|
list-cheat-sheet.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> ./list-cheat-sheet
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## 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
|
|
|
|
Lists the PowerShell cheat sheet
|
|
|
|
.DESCRIPTION
|
|
|
|
This PowerShell script lists the PowerShell cheat sheet.
|
|
|
|
.EXAMPLE
|
|
|
|
PS> ./list-cheat-sheet
|
|
|
|
.LINK
|
|
|
|
https://github.com/fleschutz/PowerShell
|
|
|
|
.NOTES
|
|
|
|
Author: Markus Fleschutz | License: CC0
|
|
|
|
#>
|
|
|
|
|
|
|
|
"PowerShell Cheat Sheet"
|
|
|
|
"======================"
|
|
|
|
""
|
|
|
|
"Basic Commands"
|
|
|
|
"--------------"
|
|
|
|
" Cmdlet : Commands built into shell written in .NET"
|
|
|
|
" Functions : Commands written in PowerShell language"
|
|
|
|
" Parameter : Argument to a Cmdlet/Function/Script"
|
|
|
|
" Alias : Shortcut for a Cmdlet or Function"
|
|
|
|
" Scripts : Text files with .ps1 extension"
|
|
|
|
" Applications : Existing windows programs"
|
|
|
|
" Pipelines : Pass objects Get-process word | Stop-Process"
|
|
|
|
" Ctrl+c : Interrupt current command"
|
|
|
|
" Left/right : Navigate editing cursor"
|
|
|
|
"Ctrl+left/right : Navigate a word at a time"
|
|
|
|
" Home / End : End Move to start / end of line"
|
|
|
|
" Up / down : Move up and down through history"
|
|
|
|
" Insert : Toggles between insert/overwrite mode"
|
|
|
|
" F7 : Command history in a window"
|
|
|
|
"Tab / Shift-Tab : Command line completion"
|
|
|
|
""
|
|
|
|
"Variables"
|
|
|
|
"---------"
|
|
|
|
" `$var = `"string`" : Assign variable"
|
|
|
|
"`$a,`$b = 0 or `$a,`$b = 'a','b' : Assign multiple variables"
|
|
|
|
" `$a,`$b = `$b,`$a : Flip variables"
|
|
|
|
" `$var=[int]5 : Strongly typed variable"
|
|
|
|
""
|
|
|
|
exit 0 # success
|
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 list-cheat-sheet.ps1*
|