Skip to content

Commit 8a3abfd

Browse files
committed
Minor edits
1 parent 3acd56a commit 8a3abfd

17 files changed

+117
-81
lines changed

reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ In this example, `Start-Job` runs a `Get-Counter` command as a background job on
171171
To view the performance counter output from the job, use the `Receive-Job` cmdlet.
172172

173173
```powershell
174-
Start-Job -ScriptBlock {Get-Counter -Counter "\LogicalDisk(_Total)\% Free Space" -MaxSamples 1000}
174+
Start-Job -ScriptBlock {
175+
Get-Counter -Counter "\LogicalDisk(_Total)\% Free Space" -MaxSamples 1000
176+
}
175177
```
176178

177179
```Output

reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ This command lists the Event Ids that the **Microsoft-Windows-GroupPolicy** even
347347
along with the event description.
348348

349349
```powershell
350-
(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events | Format-Table Id, Description
350+
(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events |
351+
Format-Table Id, Description
351352
```
352353

353354
```Output
@@ -507,7 +508,7 @@ is required.
507508

508509
```powershell
509510
Get-WinEvent -Path 'C:\Tracing\TraceLog.etl' -Oldest |
510-
Sort-Object -Property TimeCreated -Descending |
511+
Sort-Object -Property TimeCreated -Descending |
511512
Select-Object -First 100
512513
```
513514

@@ -528,7 +529,7 @@ reading from an `.etl` file, but the **Oldest** parameter applies to each file.
528529

529530
```powershell
530531
Get-WinEvent -Path 'C:\Tracing\TraceLog.etl', 'C:\Test\Windows PowerShell.evtx' -Oldest |
531-
Where-Object { $_.Id -eq '403' }
532+
Where-Object { $_.Id -eq '403' }
532533
```
533534

534535
The `Get-WinEvent` cmdlet gets log information from the archived files. The **Path** parameter uses
@@ -575,7 +576,7 @@ Get-WinEvent -LogName 'Windows PowerShell' -FilterXPath $XPath
575576

576577
This example uses the **FilterHashtable** parameter to get events from the **Application** log. The
577578
hash table uses **key/value** pairs. For more information about the **FilterHashtable** parameter,
578-
see [Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/Creating-Get-WinEvent-queries-with-FilterHashtable).
579+
see [Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/creating-get-winevent-queries-with-filterhashtable).
579580
For more information about hash tables, see
580581
[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
581582

@@ -992,7 +993,7 @@ Environment (Windows PE).
992993

993994
[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md)
994995

995-
[Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/Creating-Get-WinEvent-queries-with-FilterHashtable)
996+
[Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/creating-get-winevent-queries-with-filterhashtable)
996997

997998
[Format-Table](../Microsoft.PowerShell.Utility/Format-Table.md)
998999

reference/7.5/Microsoft.PowerShell.Management/Add-Content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ The acceptable values for this parameter are as follows:
234234
Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
235235
pages (like `-Encoding 1251`) or string names of registered code pages (like
236236
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
237-
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).
237+
[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A).
238238

239239
Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass
240240
the numeric ID for the current culture's ANSI code page without having to specify it manually.

reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ Clears the contents of an item, but does not delete the item.
1818
### Path (Default)
1919

2020
```
21-
Clear-Item [-Path] <String[]> [-Force] [-Filter <String>] [-Include <String[]>] [-Exclude <String[]>]
22-
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
Clear-Item [-Path] <String[]> [-Force] [-Filter <String>] [-Include <String[]>]
22+
[-Exclude <String[]>] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
2323
```
2424

2525
### LiteralPath
2626

2727
```
28-
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String[]>] [-Exclude <String[]>]
29-
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
28+
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String[]>]
29+
[-Exclude <String[]>] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION
@@ -248,10 +248,10 @@ Accept wildcard characters: False
248248

249249
### CommonParameters
250250

251-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`,
252-
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`,
253-
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see
254-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
251+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
252+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
253+
-WarningAction, and -WarningVariable. For more information, see
254+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
255255

256256
## INPUTS
257257

reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ Accept wildcard characters: False
256256

257257
### CommonParameters
258258

259-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`,
260-
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`,
261-
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see
262-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
259+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
260+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
261+
-WarningAction, and -WarningVariable. For more information, see
262+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
263263

264264
## INPUTS
265265

reference/7.5/Microsoft.PowerShell.Management/Copy-Item.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ operation, the command changes the item name from `Get-Widget.ps1` to `Get-Widge
118118
can be safely attached to email messages.
119119

120120
```powershell
121-
Copy-Item "\\Server01\Share\Get-Widget.ps1" -Destination "\\Server12\ScriptArchive\Get-Widget.ps1.txt"
121+
$copyParams = @{
122+
Path = "\\Server01\Share\Get-Widget.ps1"
123+
Destination = "\\Server12\ScriptArchive\Get-Widget.ps1.txt"
124+
}
125+
Copy-Item @copyParams
122126
```
123127

124128
### Example 5: Copy a file to a remote computer
@@ -176,7 +180,12 @@ The `Copy-Item` cmdlet copies `scriptingexample.ps1` from the `D:\Folder004` fol
176180

177181
```powershell
178182
$Session = New-PSSession -ComputerName "Server04" -Credential "Contoso\User01"
179-
Copy-Item "D:\Folder004\scriptingexample.ps1" -Destination "C:\Folder004_Copy\scriptingexample_copy.ps1" -ToSession $Session
183+
$copyParams = @{
184+
Path = "D:\Folder004\scriptingexample.ps1"
185+
Destination = "C:\Folder004_Copy\scriptingexample_copy.ps1"
186+
ToSession = $Session
187+
}
188+
Copy-Item @copyParams
180189
```
181190

182191
### Example 9: Copy a remote file to the local computer
@@ -221,7 +230,13 @@ copied with their file trees intact.
221230

222231
```powershell
223232
$Session = New-PSSession -ComputerName "Server01" -Credential "Contoso\User01"
224-
Copy-Item "C:\MyRemoteData\scripts" -Destination "D:\MyLocalData\scripts" -FromSession $Session -Recurse
233+
$copyParams = @{
234+
Path = "C:\MyRemoteData\scripts"
235+
Destination = "D:\MyLocalData\scripts"
236+
FromSession = $Session
237+
Recurse = $true
238+
}
239+
Copy-Item @copyParams
225240
```
226241

227242
### Example 12: Recursively copy files from a folder tree into the current folder

reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Copy-ItemProperty [-Path] <String[]> [-Name] <String> [-Destination] <String> [-
2626
### LiteralPath
2727

2828
```
29-
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <String> [-PassThru] [-Force]
30-
[-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-Credential <PSCredential>]
31-
[-WhatIf] [-Confirm] [<CommonParameters>]
29+
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <String> [-PassThru]
30+
[-Force] [-Filter <String>] [-Include <String[]>] [-Exclude <String[]>]
31+
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>]
3232
```
3333

3434
## DESCRIPTION
@@ -46,7 +46,12 @@ This command copies the property named "MyProperty" from the "MyApplication" reg
4646
"MyApplicationRev2" registry key.
4747

4848
```powershell
49-
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty"
49+
$copyParams = @{
50+
Path = "MyApplication"
51+
Destination = "HKLM:\Software\MyApplicationRev2"
52+
Name = "MyProperty"
53+
}
54+
Copy-ItemProperty @copyParams
5055
```
5156

5257
## PARAMETERS
@@ -274,10 +279,11 @@ Accept wildcard characters: False
274279

275280
### CommonParameters
276281

277-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`,
278-
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`,
279-
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see
280-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
282+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
283+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
284+
-WarningAction, and -WarningVariable. For more information, see
285+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
286+
281287

282288
## INPUTS
283289

reference/7.5/Microsoft.PowerShell.Management/Get-ChildItem.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ as follows:
123123
- `s` (system)
124124

125125
For more information about the mode flags, see
126-
[about_Filesystem_Provider](../microsoft.powershell.core/About/about_Filesystem_Provider.md#attributes-flagsexpression).
126+
[about_Filesystem_Provider](../Microsoft.PowerShell.Core/About/about_Filesystem_Provider.md#attributes-flagsexpression).
127127

128128
### Example 2: Get child item names in a directory
129129

@@ -507,8 +507,8 @@ The **Attributes** parameter supports the following properties:
507507
- **System**
508508
- **Temporary**
509509

510-
For a description of these attributes, see the
511-
[FileAttributes Enumeration](/dotnet/api/system.io.fileattributes).
510+
For a description of these attributes, see the [FileAttributes](xref:System.IO.FileAttributes)
511+
enumeration.
512512

513513
To combine attributes, use the following operators:
514514

@@ -864,7 +864,7 @@ it in single quotation marks. Single quotation marks tell PowerShell to not inte
864864
as escape sequences.
865865

866866
For more information, see
867-
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md).
867+
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md).
868868

869869
```yaml
870870
Type: System.String[]
@@ -1075,7 +1075,7 @@ providers available in your session, type `Get-PSProvider`. For more information
10751075

10761076
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
10771077

1078-
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
1078+
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
10791079

10801080
[about_Registry_Provider](../Microsoft.PowerShell.Core/About/about_Registry_Provider.md)
10811081

reference/7.5/Microsoft.PowerShell.Management/Get-Content.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ This example gets the content of a file in the current directory. The `LineNumbe
5050
has 100 lines in the format, **This is Line X** and is used in several examples.
5151

5252
```powershell
53-
1..100 | ForEach-Object { Add-Content -Path .\LineNumbers.txt -Value "This is line $_." }
53+
1..100 | ForEach-Object {
54+
Add-Content -Path .\LineNumbers.txt -Value "This is line $_."
55+
}
5456
Get-Content -Path .\LineNumbers.txt
5557
```
5658

@@ -214,7 +216,7 @@ Added a stream named NewStream to Stream.txt
214216
```
215217

216218
The **Stream** parameter is a dynamic parameter of the
217-
[FileSystem provider](../microsoft.powershell.core/About/about_Filesystem_Provider.md#stream-string).
219+
[FileSystem provider](../Microsoft.PowerShell.Core/About/about_Filesystem_Provider.md#stream-string).
218220
By default `Get-Content` only retrieves data from the default, or `:$DATA` stream. **Streams** can
219221
be used to store hidden data such as attributes, security settings, or other data. They can also be
220222
stored on directories without being child items.
@@ -376,7 +378,7 @@ This parameter is available only in file system drives.
376378
Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code
377379
pages (like `-Encoding 1251`) or string names of registered code pages (like
378380
`-Encoding "windows-1251"`). For more information, see the .NET documentation for
379-
[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2).
381+
[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A).
380382

381383
Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass
382384
the numeric ID for the current culture's ANSI code page without having to specify it manually.
@@ -488,7 +490,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte
488490
as escape sequences.
489491

490492
For more information, see
491-
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md).
493+
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md).
492494

493495
```yaml
494496
Type: System.String[]

reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ The `Get-Hotfix` command uses parameters to get hotfixes installed on remote com
6060
are filtered by a specified description string.
6161

6262
```powershell
63-
Get-HotFix -Description Security* -ComputerName Server01, Server02 -Credential Domain01\admin01
63+
$hotFixParams = @{
64+
Description = "Security*"
65+
ComputerName = "Server01, Server02"
66+
Credential = "Domain01\admin01"
67+
}
68+
Get-HotFix @hotFixParams
6469
```
6570

6671
`Get-Hotfix` filters the output with the **Description** parameter and the string **Security** that

reference/7.5/Microsoft.PowerShell.Management/Get-Item.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ In PowerShell 6.2, an alternate view was added to get hardlink information. To g
170170
information, pipe the output to `Format-Table -View childrenWithHardlink`
171171

172172
```powershell
173-
Get-Item C:\Windows\System32\ntoskrnl.exe | Format-Table -View childrenWithHardLink
173+
Get-Item C:\Windows\System32\ntoskrnl.exe |
174+
Format-Table -View childrenWithHardLink
174175
```
175176

176177
```Output

reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ Gets the value for one or more properties of a specified item.
1818
### Path (Default)
1919

2020
```
21-
Get-ItemPropertyValue [[-Path] <String[]>] [-Name] <String[]> [-Filter <String>] [-Include <String[]>]
22-
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>]
21+
Get-ItemPropertyValue [[-Path] <String[]>] [-Name] <String[]> [-Filter <String>]
22+
[-Include <String[]>] [-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>]
2323
```
2424

2525
### LiteralPath
2626

2727
```
28-
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <String>] [-Include <String[]>]
29-
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>]
28+
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <String>]
29+
[-Include <String[]>] [-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>]
3030
```
3131

3232
## DESCRIPTION
@@ -39,8 +39,8 @@ parameters.
3939

4040
### Example 1: Get the value of the ProductID property
4141

42-
This command gets the value of the **ProductID** property of the "\SOFTWARE\Microsoft\Windows
43-
NT\CurrentVersion" object in the Windows Registry provider.
42+
This command gets the value of the **ProductID** property of the
43+
`\SOFTWARE\Microsoft\Windows NT\CurrentVersion` object in the Windows Registry provider.
4444

4545
```powershell
4646
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductID
@@ -237,10 +237,10 @@ Accept wildcard characters: True
237237

238238
### CommonParameters
239239

240-
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`,
241-
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`,
242-
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see
243-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
240+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
241+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
242+
-WarningAction, and -WarningVariable. For more information, see
243+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
244244

245245
## INPUTS
246246

@@ -252,8 +252,8 @@ You can pipe a string that contains a path to this cmdlet.
252252

253253
### System.Management.Automation.PSObject
254254

255-
This cmdlet returns an object for each item property value that it gets.
256-
The object type depends on the property value that is retrieved.
255+
This cmdlet returns an object for each item property value that it gets. The object type depends on
256+
the property value that is retrieved.
257257

258258
## NOTES
259259

reference/7.5/Microsoft.PowerShell.Management/Get-Service.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ Status is only one property of service objects. To see all of the properties, ty
106106
This example gets services that have dependent services.
107107

108108
```powershell
109-
Get-Service |
110-
Where-Object {$_.DependentServices} |
109+
Get-Service | Where-Object {$_.DependentServices} |
111110
Format-List -Property Name, DependentServices, @{
112-
Label="NoOfDependentServices"; Expression={$_.DependentServices.Count}
111+
Label="NoOfDependentServices"
112+
Expression={$_.DependentServices.Count}
113113
}
114114
```
115115

@@ -138,7 +138,7 @@ This example shows that when you sort services in ascending order by the value o
138138
property, stopped services appear before running services. This happens because the value of
139139
**Status** is an enumeration, in which `Stopped` has a value of `1`, and `Running` has a value of
140140
`4`. For more information, see
141-
[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
141+
[ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus).
142142

143143
To list running services first, use the **Descending** parameter of the `Sort-Object` cmdlet.
144144

@@ -360,8 +360,7 @@ When you sort in ascending order by status value, `Stopped` services appear befo
360360
services. The **Status** property of a service is an enumerated value in which the names of the
361361
statuses represent integer values. The sort is based on the integer value, not the name. `Running`
362362
appears before `Stopped` because `Stopped` has a value of `1`, and `Running` has a value of `4`. For
363-
more information, see
364-
[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
363+
more information, see [ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus).
365364

366365
## RELATED LINKS
367366

reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Accept wildcard characters: False
217217
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
218218
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
219219
-WarningAction, and -WarningVariable. For more information, see
220-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
220+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
221221

222222
## INPUTS
223223

0 commit comments

Comments
 (0)