summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLaoujin <woutervs@hotmail.com>2016-01-08 19:50:57 +0100
committerLaoujin <woutervs@hotmail.com>2016-01-08 19:52:33 +0100
commite4e737c37125ed831b8f4d24d2d4953814ef9722 (patch)
tree8067c9a25ff786eef8c3688406e34c3b3150ba0b
parentbb88bea41907cc0ea7c9a23d488a48dd9dd4779c (diff)
[PowerShell/en]: fixed typos/layout. Added some extra aliases/info.
-rw-r--r--powershell.html.markdown10
1 files changed, 8 insertions, 2 deletions
diff --git a/powershell.html.markdown b/powershell.html.markdown
index 8920d254..fc944b85 100644
--- a/powershell.html.markdown
+++ b/powershell.html.markdown
@@ -247,10 +247,12 @@ function New-Website() {
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
# Note that .NET functions MUST be called with parentheses
-# while PS functions CANNOT be called with parentheses
+# while PS functions CANNOT be called with parentheses.
+# If you do call a cmdlet/PS function with parentheses,
+# it is the same as passing a single parameter list
$writer = New-Object System.IO.StreamWriter($path, $true)
$writer.Write([Environment]::NewLine)
-$write.Dispose()
+$writer.Dispose()
### IO
# Reading a value from input:
@@ -268,12 +270,14 @@ Get-Command ConvertTo-*,ConvertFrom-*
# Refresh your PATH
$env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") +
";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
+
# Find Python in path
$env:PATH.Split(";") | Where-Object { $_ -like "*python*"}
# Change working directory without having to remember previous path
Push-Location c:\temp # change working directory to c:\temp
Pop-Location # change back to previous working directory
+# Aliases are: pushd and popd
# Unblock a directory after download
Get-ChildItem -Recurse | Unblock-File
@@ -308,6 +312,7 @@ if (-not (Test-Path $Profile)) {
```
Interesting Projects
+
* [Channel9](https://channel9.msdn.com/Search?term=powershell%20pipeline#ch9Search&lang-en=en) PowerShell tutorials
* [PSGet](https://github.com/psget/psget) NuGet for PowerShell
* [PSReadLine](https://github.com/lzybkr/PSReadLine/) A bash inspired readline implementation for PowerShell (So good that it now ships with Windows10 by default!)
@@ -318,6 +323,7 @@ Interesting Projects
* [PowerShell Community Extensions](http://pscx.codeplex.com/) (Dead)
Not covered
+
* WMI: Windows Management Intrumentation (Get-CimInstance)
* Multitasking: Start-Job -scriptBlock {...},
* Code Signing