[PowerShell/en]: fixed typos/layout. Added some extra aliases/info.

This commit is contained in:
Laoujin 2016-01-08 19:50:57 +01:00
parent bb88bea419
commit e4e737c371

View File

@ -247,10 +247,12 @@ function New-Website() {
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
# Note that .NET functions MUST be called with parentheses # 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 = New-Object System.IO.StreamWriter($path, $true)
$writer.Write([Environment]::NewLine) $writer.Write([Environment]::NewLine)
$write.Dispose() $writer.Dispose()
### IO ### IO
# Reading a value from input: # Reading a value from input:
@ -268,12 +270,14 @@ Get-Command ConvertTo-*,ConvertFrom-*
# Refresh your PATH # Refresh your PATH
$env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + $env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") +
";" + [System.Environment]::GetEnvironmentVariable("Path", "User") ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# Find Python in path # Find Python in path
$env:PATH.Split(";") | Where-Object { $_ -like "*python*"} $env:PATH.Split(";") | Where-Object { $_ -like "*python*"}
# Change working directory without having to remember previous path # Change working directory without having to remember previous path
Push-Location c:\temp # change working directory to c:\temp Push-Location c:\temp # change working directory to c:\temp
Pop-Location # change back to previous working directory Pop-Location # change back to previous working directory
# Aliases are: pushd and popd
# Unblock a directory after download # Unblock a directory after download
Get-ChildItem -Recurse | Unblock-File Get-ChildItem -Recurse | Unblock-File
@ -308,6 +312,7 @@ if (-not (Test-Path $Profile)) {
``` ```
Interesting Projects Interesting Projects
* [Channel9](https://channel9.msdn.com/Search?term=powershell%20pipeline#ch9Search&lang-en=en) PowerShell tutorials * [Channel9](https://channel9.msdn.com/Search?term=powershell%20pipeline#ch9Search&lang-en=en) PowerShell tutorials
* [PSGet](https://github.com/psget/psget) NuGet for PowerShell * [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!) * [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) * [PowerShell Community Extensions](http://pscx.codeplex.com/) (Dead)
Not covered Not covered
* WMI: Windows Management Intrumentation (Get-CimInstance) * WMI: Windows Management Intrumentation (Get-CimInstance)
* Multitasking: Start-Job -scriptBlock {...}, * Multitasking: Start-Job -scriptBlock {...},
* Code Signing * Code Signing