Skip to content

Commit 225441e

Browse files
authored
Markdown and PS Styles (#11697)
* PS style and format * fix reference
1 parent 9be6a8c commit 225441e

23 files changed

+155
-131
lines changed

reference/7.5/Microsoft.PowerShell.Archive/Expand-Archive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ different than the source filename stored in the archive.
210210

211211
## RELATED LINKS
212212

213-
[Compress-Archive](compress-archive.md)
213+
[Compress-Archive](Compress-Archive.md)

reference/7.5/Microsoft.PowerShell.Archive/Microsoft.PowerShell.Archive.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ title: Microsoft.PowerShell.Archive
1313

1414
## Description
1515

16-
This section contains the help topics for the cmdlets that are installed with the PowerShell Microsoft.PowerShell.Archive module. The Archive module contains cmdlets that let you create and extract archive or ZIP files.
16+
This section contains the help topics for the cmdlets that are installed with the PowerShell
17+
Microsoft.PowerShell.Archive module. The Archive module contains cmdlets that let you create and
18+
extract archive or ZIP files.
1719

1820
## Microsoft.PowerShell.Archive Cmdlets
1921

reference/7.5/Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ The following values of `$env:TERM` change the behavior as follows:
253253

254254
- `dumb` - sets `$Host.UI.SupportsVirtualTerminal = $false`
255255
- `xterm-mono` - sets `$PSStyle.OutputRendering = PlainText`
256-
- `xtermm` - sets `$PSStyle.OutputRendering = PlainText`
256+
- `xterm` - sets `$PSStyle.OutputRendering = PlainText`
257257

258258
If `$env:NO_COLOR` exists, then `$PSStyle.OutputRendering` is set to
259259
**PlainText**. For more information about the **NO_COLOR** environment

reference/7.5/Microsoft.PowerShell.Core/About/about_Alias_Provider.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,27 @@ The aliases have no child items.
4040
The **Alias** provider supports the following cmdlets, which are covered
4141
in this article.
4242

43-
- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location)
44-
- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location)
45-
- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item)
46-
- [New-Item](xref:Microsoft.PowerShell.Management.New-Item)
47-
- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item)
48-
- [Clear-Item](xref:Microsoft.PowerShell.Management.Clear-Item)
43+
- [Get-Location][01]
44+
- [Set-Location][02]
45+
- [Get-Item][03]
46+
- [New-Item][04]
47+
- [Remove-Item][05]
48+
- [Clear-Item][06]
4949

5050
PowerShell includes a set of cmdlets that are designed to view and to change
5151
aliases. When you use **Alias** cmdlets, you do not need to specify the
5252
`Alias:` drive in the name. This article does not cover working with **Alias**
5353
cmdlets.
5454

55-
- [Export-Alias](xref:Microsoft.PowerShell.Utility.Export-Alias)
56-
- [Get-Alias](xref:Microsoft.PowerShell.Utility.Get-Alias)
57-
- [Import-Alias](xref:Microsoft.PowerShell.Utility.Import-Alias)
58-
- [New-Alias](xref:Microsoft.PowerShell.Utility.New-Alias)
59-
- [Set-Alias](xref:Microsoft.PowerShell.Utility.Set-Alias)
55+
- [Export-Alias][07]
56+
- [Get-Alias][08]
57+
- [Import-Alias][09]
58+
- [New-Alias][10]
59+
- [Set-Alias][11]
6060

6161
## Types exposed by this provider
6262

63-
Each alias is an instance of the
64-
[System.Management.Automation.AliasInfo](/dotnet/api/system.management.automation.aliasinfo)
63+
Each alias is an instance of the [System.Management.Automation.AliasInfo][12]
6564
class.
6665

6766
## Navigating the Alias drive
@@ -87,11 +86,8 @@ path.
8786
> [!NOTE]
8887
> PowerShell uses aliases to allow you a familiar way to work with provider
8988
> paths. Commands such as `dir` and `ls` are now aliases on Windows and `dir`
90-
> on Linux and macOS for [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem),
91-
> `cd` is an alias for
92-
> [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location). and `pwd`
93-
> is an alias for
94-
> [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location).
89+
> on Linux and macOS for [Get-ChildItem][13], `cd` is an alias for
90+
> [Set-Location][02] and `pwd` is an alias for [Get-Location][01].
9591
9692
### Displaying the Contents of the Alias: drive
9793

@@ -198,7 +194,7 @@ cmdlet. The `-Options` parameter is available in `Set-Item` when you use it
198194
with the **Alias** or **Function** provider.
199195

200196
```powershell
201-
Set-Item -Path Alias:dir -Options "AllScope,ReadOnly"
197+
Set-Item -Path Alias:dir -Options "AllScope, ReadOnly"
202198
```
203199

204200
### Change an aliases referenced command
@@ -293,8 +289,8 @@ Determines the value of the **Options** property of an alias.
293289

294290
#### Cmdlets supported
295291

296-
- [New-Item](xref:Microsoft.PowerShell.Management.New-Item)
297-
- [Set-Item](xref:Microsoft.PowerShell.Management.Set-Item)
292+
- [New-Item][04]
293+
- [Set-Item][14]
298294

299295
## Using the pipeline
300296

@@ -309,10 +305,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for
309305
provider cmdlets that explain how those cmdlets behave in a file system drive.
310306

311307
To get the help topics that are customized for the file system drive, run a
312-
[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file system
313-
drive or use the `-Path` parameter of
314-
[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file system
315-
drive.
308+
[Get-Help][15] command in a file system drive or use the `-Path` parameter of
309+
[Get-Help][15] to specify a file system drive.
316310

317311
```powershell
318312
Get-Help Get-ChildItem
@@ -324,5 +318,24 @@ Get-Help Get-ChildItem -Path alias:
324318

325319
## See also
326320

327-
- [about_Aliases](about_Aliases.md)
328-
- [about_Providers](about_Providers.md)
321+
- [about_Aliases][16]
322+
- [about_Providers][17]
323+
324+
<!-- External links -->
325+
[01]: xref:Microsoft.PowerShell.Management.Get-Location
326+
[02]: xref:Microsoft.PowerShell.Management.Set-Location
327+
[03]: xref:Microsoft.PowerShell.Management.Get-Item
328+
[04]: xref:Microsoft.PowerShell.Management.New-Item
329+
[05]: xref:Microsoft.PowerShell.Management.Remove-Item
330+
[06]: xref:Microsoft.PowerShell.Management.Clear-Item
331+
[07]: xref:Microsoft.PowerShell.Utility.Export-Alias
332+
[08]: xref:Microsoft.PowerShell.Utility.Get-Alias
333+
[09]: xref:Microsoft.PowerShell.Utility.Import-Alias
334+
[10]: xref:Microsoft.PowerShell.Utility.New-Alias
335+
[11]: xref:Microsoft.PowerShell.Utility.Set-Alias
336+
[12]: /dotnet/api/system.management.automation.aliasinfo
337+
[13]: xref:Microsoft.PowerShell.Management.Get-ChildItem
338+
[14]: xref:Microsoft.PowerShell.Management.Set-Item
339+
[15]: xref:Microsoft.PowerShell.Core.Get-Help
340+
[16]: about_Aliases.md
341+
[17]: about_Providers.md

reference/7.5/Microsoft.PowerShell.Core/About/about_Aliases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ in the current session, type:
129129
Get-Alias
130130
```
131131

132-
To get particular aliases, use the Name parameter of the `Get-Alias` cmdlet. For
133-
example, to get aliases that begin with "p", type:
132+
To get particular aliases, use the Name parameter of the `Get-Alias` cmdlet.
133+
For example, to get aliases that begin with "p", type:
134134

135135
```powershell
136136
Get-Alias -Name p*

reference/7.5/Microsoft.PowerShell.Core/About/about_Arithmetic_Operators.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ result without losing precision. For example:
203203
(2 + 3.1).GetType().FullName
204204
```
205205

206-
```output
206+
```Output
207207
5.1
208208
System.Int32
209209
System.Double
@@ -217,7 +217,7 @@ is widened to accommodate the result, as in the following example:
217217
(512MB * 512MB).GetType().FullName
218218
```
219219

220-
```output
220+
```Output
221221
System.Int32
222222
System.Double
223223
```
@@ -230,7 +230,7 @@ the unsigned integer is too large to be cast to `Int32`:
230230
([int32]::minvalue + [uint32]::maxvalue).GetType().FullName
231231
```
232232

233-
```output
233+
```Output
234234
System.Int64
235235
```
236236

@@ -269,8 +269,8 @@ PS> [ulong](9223372036854775807 + 2)
269269
9223372036854775808
270270
```
271271

272-
Defining the larger value as `[ulong]` first avoids the problem and produces the
273-
correct result.
272+
Defining the larger value as `[ulong]` first avoids the problem and produces
273+
the correct result.
274274

275275
```powershell
276276
PS> 9223372036854775807ul + 2
@@ -327,7 +327,7 @@ $b = "A","B","C"
327327
$a + $b
328328
```
329329

330-
```output
330+
```Output
331331
1
332332
2
333333
3
@@ -390,7 +390,7 @@ $hash2 = @{c1="Server01"; c2="Server02"}
390390
$hash1 + $hash2
391391
```
392392

393-
```output
393+
```Output
394394
Name Value
395395
---- -----
396396
c2 Server02
@@ -409,7 +409,7 @@ $hash2 = @{c1="Server01"; c="Server02"}
409409
$hash1 + $hash2
410410
```
411411

412-
```output
412+
```Output
413413
OperationStopped:
414414
Line |
415415
3 | $hash1 + $hash2
@@ -427,7 +427,7 @@ $array2 = $array1 + $hash1
427427
$array2
428428
```
429429

430-
```output
430+
```Output
431431
0
432432
Hello World
433433
@@ -448,7 +448,7 @@ However, you can't add any other type to a hash table.
448448
$hash1 + 2
449449
```
450450

451-
```output
451+
```Output
452452
InvalidOperation: A hash table can only be added to another hash table.
453453
```
454454

@@ -463,7 +463,7 @@ $array = @()
463463
$array
464464
```
465465

466-
```output
466+
```Output
467467
0
468468
1
469469
2
@@ -508,7 +508,7 @@ results are then added using the `+` operator.
508508
Get-Process | Where-Object { ($_.ws * 2) -gt 50mb }
509509
```
510510

511-
```output
511+
```Output
512512
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
513513
------- ------ ----- ----- ----- ------ -- -----------
514514
1896 39 50968 30620 264 1,572.55 1104 explorer

reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ The value of `mode` must be a [WhereOperatorSelectionMode][02] enum value:
639639
- `Default` (`0`) - Return all items
640640
- `First` (`1`) - Return the first item
641641
- `Last` (`2`) - Return the last item
642-
- `SkipUntil` (`3`) - Skip items until condition is true, return all the remaining
643-
items (including the first item for which the condition is true)
642+
- `SkipUntil` (`3`) - Skip items until condition is true, return all the
643+
remaining items (including the first item for which the condition is true)
644644
- `Until` (`4`) - Return all items until condition is true
645645
- `Split` (`5`) - Return an array of two elements
646646
- The first element contains matching items
@@ -1018,8 +1018,7 @@ PS> [Collections.Generic.Dictionary[string, int]]::new()['nosuchkey']
10181018
# No output ($null)
10191019
10201020
PS> [Collections.Generic.Dictionary[string, int]]::new().Item('nosuchkey')
1021-
GetValueInvocationException: Exception getting "Item": "The given key 'nosuchkey'
1022-
was not present in the dictionary."
1021+
GetValueInvocationException: Exception getting "Item": "The given key 'nosuchkey' was not present in the dictionary."
10231022
```
10241023

10251024
## Member-access enumeration

reference/7.5/Microsoft.PowerShell.Core/About/about_Assignment_Operators.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ $a += 2
199199
$a
200200
```
201201

202-
```
202+
```Output
203203
6
204204
```
205205

@@ -646,8 +646,7 @@ $x
646646
100
647647
```
648648

649-
For more information, see
650-
[Null-coalescing operator][04].
649+
For more information, see [Null-coalescing operator][04].
651650

652651
## Microsoft .NET types
653652

reference/7.5/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe
77
schema: 2.0.0
88
title: about_Automatic_Variables
99
---
10-
1110
# about_Automatic_Variables
1211

1312
## Short description
@@ -422,7 +421,7 @@ the objects.
422421

423422
```powershell
424423
$a = "one", $null, "three"
425-
$a.count
424+
$a.Count
426425
```
427426

428427
```Output
@@ -433,7 +432,7 @@ If you pipe the `$null` variable to the `ForEach-Object` cmdlet, it generates a
433432
value for `$null`, just as it does for the other objects
434433

435434
```powershell
436-
"one", $null, "three" | ForEach-Object { "Hello " + $_}
435+
"one", $null, "three" | ForEach-Object {"Hello " + $_}
437436
```
438437

439438
```Output
@@ -451,8 +450,8 @@ were ignored.
451450

452451
```powershell
453452
$calendar = @($null, $null, "Meeting", $null, $null, "Team Lunch", $null)
454-
$days = "Sunday","Monday","Tuesday","Wednesday","Thursday",
455-
"Friday","Saturday"
453+
$days = "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
454+
"Friday", "Saturday"
456455
$currentDay = 0
457456
foreach($day in $calendar)
458457
{
@@ -744,10 +743,9 @@ isn't considered best practice.
744743

745744
### MoveNext
746745

747-
The [MoveNext][76] method
748-
advances the enumerator to the next element of the collection. **MoveNext**
749-
returns `True` if the enumerator was successfully advanced, `False` if the
750-
enumerator has passed the end of the collection.
746+
The [MoveNext][76] method advances the enumerator to the next element of the
747+
collection. **MoveNext** returns `True` if the enumerator was successfully
748+
advanced, `False` if the enumerator has passed the end of the collection.
751749

752750
> [!NOTE]
753751
> The **Boolean** value returned by **MoveNext** is sent to the output stream.

reference/7.5/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ even pass control across script and function call boundaries.
123123

124124
## Using `break` in a `switch` statement
125125

126-
In a `switch`construct, `break` causes PowerShell to exit the `switch` code block.
126+
In a `switch`construct, `break` causes PowerShell to exit the `switch` code
127+
block.
127128

128129
The `break` keyword is used to leave the `switch` construct. For example, the
129130
following `switch` statement uses `break` statements to test for the most
@@ -190,8 +191,8 @@ function test {
190191
test
191192
```
192193

193-
Notice that execution stops at the exception. The `After loop` is never reached.
194-
The exception is re-thrown after the `trap` executes.
194+
Notice that execution stops at the exception. The `After loop` is never
195+
reached. The exception is re-thrown after the `trap` executes.
195196

196197
```Output
197198
Before loop

0 commit comments

Comments
 (0)