Last active
February 21, 2017 07:46
-
-
Save Cauterite/65e8305be8096f169b7f2e82bd6fe18a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# comments | |
<# multiline comments #> | |
# running unsigned scripts | |
c:\> powershell -ExecutionPolicy Bypass -File foo.ps1 | |
# filter, map | |
get-process | | |
where {$_.ProcessName -eq "svchost"} | | |
foreach {$_.Id} | |
# void statement in script block | |
@(5, 6) | foreach { | |
[void](get-date); | |
$_ + 1} | |
# special vars | |
# https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.core/about/about_automatic_variables | |
$true, $false, $null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment