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
|
|
|
|
Lists the PowerShell cheat sheet
|
2021-10-04 21:29:23 +02:00
|
|
|
|
.DESCRIPTION
|
2022-01-29 12:47:46 +01:00
|
|
|
|
This PowerShell script lists the PowerShell cheat sheet.
|
2021-07-13 21:10:02 +02:00
|
|
|
|
.EXAMPLE
|
2021-09-24 17:19:49 +02:00
|
|
|
|
PS> ./list-cheat-sheet
|
2021-07-13 21:10:02 +02:00
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/fleschutz/PowerShell
|
2022-01-29 12:47:46 +01:00
|
|
|
|
.NOTES
|
|
|
|
|
Author: Markus Fleschutz / License: CC0
|
2021-04-10 11:42:06 +02:00
|
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
"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"
|
|
|
|
|
""
|
2021-09-27 10:09:45 +02:00
|
|
|
|
exit 0 # success
|