diff options
author | Adam Bard <github@adambard.com> | 2016-01-09 04:33:10 +0800 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2016-01-09 04:33:10 +0800 |
commit | 468460ab298be9595ea3136e184d5d779abd846e (patch) | |
tree | 8e5f8541654e9d6f6730419ac7a4fea59a954e3b /powershell.html.markdown | |
parent | d70c27beedbda9bfebaff61f4ff71cf39ca43d26 (diff) | |
parent | e4e737c37125ed831b8f4d24d2d4953814ef9722 (diff) |
Merge pull request #2094 from Laoujin/master
[PowerShell/en]: fixed typos/layout. Added some extra aliases/info.
Diffstat (limited to 'powershell.html.markdown')
-rw-r--r-- | powershell.html.markdown | 10 |
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 |