summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorven <vendethiel@hotmail.fr>2015-11-28 22:38:51 +0100
committerven <vendethiel@hotmail.fr>2015-11-28 22:38:51 +0100
commit224f42c3172dbce3522d235dd36ea0fc9b8f1738 (patch)
tree7b86f843cc508349a0e92e393d539840975766d1
parent4a0bbbfb2ed0912dd673a08f12fc52347d686eec (diff)
parente9b3854e16437896d83dd1a5df9f2dfe50a9746a (diff)
Merge pull request #2042 from Laoujin/master
PowerShell/en: poor website render
-rw-r--r--powershell.html.markdown11
1 files changed, 5 insertions, 6 deletions
diff --git a/powershell.html.markdown b/powershell.html.markdown
index ce9cfa72..4bc1ab39 100644
--- a/powershell.html.markdown
+++ b/powershell.html.markdown
@@ -18,7 +18,7 @@ rather than plain text.
[Read more here.](https://technet.microsoft.com/en-us/library/bb978526.aspx)
If you are uncertain about your environment:
-```powershell
+```
Get-ExecutionPolicy -List
Set-ExecutionPolicy AllSigned
# Execution policies include:
@@ -33,7 +33,7 @@ $PSVersionTable
```
Getting help:
-```powershell
+```
# Find commands
Get-Command about_* # alias: gcm
Get-Command -Verb Add
@@ -49,7 +49,7 @@ Update-Help # Run as admin
```
The tutorial starts here:
-```powershell
+```
# As you already figured, comments start with #
# Simple hello world example:
@@ -164,7 +164,6 @@ ls -fi *.txt -n # -f is not possible because -Force also exists
# Use `Get-Help Get-ChildItem -Full` for a complete overview
# Results of the previous cmdlet can be passed to the next as input.
-# grep cmdlet filters the input with provided patterns.
# `$_` is the current object in the pipeline object.
ls | Where-Object { $_.Name -match 'c' } | Export-CSV export.txt
ls | ? { $_.Name -match 'c' } | ConvertTo-HTML | Out-File export.html
@@ -293,7 +292,7 @@ $Shortcut.Save()
Configuring your shell
-```powershell
+```
# $Profile is the full path for your `Microsoft.PowerShell_profile.ps1`
# All code there will be executed when the PS session starts
if (-not (Test-Path $Profile)) {
@@ -318,4 +317,4 @@ Not covered
* WMI: Windows Management Intrumentation (Get-CimInstance)
* Multitasking: Start-Job -scriptBlock {...},
* Code Signing
-* Remoting (Enter-PSSession/Exit-PSSession; Invoke-Command) \ No newline at end of file
+* Remoting (Enter-PSSession/Exit-PSSession; Invoke-Command)