Skip to content

Commit b93f756

Browse files
committed
Fixes doc bugs
1 parent 5cc2652 commit b93f756

3 files changed

Lines changed: 18 additions & 21 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Whatever was typed on the command line prior to hitting `F7` or `Shift-F7` will
122122
### Example 8: Output processes to a tree view
123123

124124
```PowerShell
125-
PS C:\> Get-Process | Show-ObjectTree
125+
Get-Process | Show-ObjectTree
126126
```
127127

128128
This command gets the processes running on the local computer and sends them to a tree view window.

docs/Microsoft.PowerShell.ConsoleGuiTools/Out-ConsoleGridView.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ Sends output to an interactive table in the same console window.
2525

2626
The **Out-ConsoleGridView** cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table.
2727

28-
You can use the following features of the table to examine your data:
29-
30-
- Quick Filter. Use the Filter box at the top of the window to search the text in the table. You can search for text in a particular column, search for literals, and search for multiple words. You can use the `-Filter` command to pre-populate the Filter box. The filter uses regular expressions.
28+
Use the Filter box at the top of the window to search the text in the table. Search for text in a particular column, search for literals, and search for multiple words. Use the `-Filter` parameter to pre-populate the Filter box. The filter uses regular expressions.
3129

3230
For instructions for using these features, type `Get-Help Out-ConsoleGridView -Full` and see How to Use the Grid View Window Features in the Notes section.
3331

@@ -38,16 +36,16 @@ To send items from the interactive window down the pipeline, click to select the
3836
### Example 1: Output processes to a grid view
3937

4038
```PowerShell
41-
PS C:\> Get-Process | Out-ConsoleGridView
39+
Get-Process | Out-ConsoleGridView
4240
```
4341

4442
This command gets the processes running on the local computer and sends them to a grid view window.
4543

4644
### Example 2: Use a variable to output processes to a grid view
4745

4846
```PowerShell
49-
PS C:\> $P = Get-Process
50-
PS C:\> $P | Out-ConsoleGridView -OutputMode Single
47+
$P = Get-Process
48+
$P | Out-ConsoleGridView -OutputMode Single
5149
```
5250

5351
This command also gets the processes running on the local computer and sends them to a grid view window.
@@ -61,7 +59,7 @@ By specifying `-OutputMode Single` the grid view window will be restricted to a
6159
### Example 3: Display a formatted table in a grid view
6260

6361
```PowerShell
64-
PS C:\> Get-Process | Select-Object -Property Name, WorkingSet, PeakWorkingSet | Sort-Object -Property WorkingSet -Descending | Out-ConsoleGridView
62+
Get-Process | Select-Object -Property Name, WorkingSet, PeakWorkingSet | Sort-Object -Property WorkingSet -Descending | Out-ConsoleGridView
6563
```
6664

6765
This command displays a formatted table in a grid view window.
@@ -80,7 +78,7 @@ You can now use the features of the grid view to search, sort, and filter the da
8078
### Example 4: Save output to a variable, and then output a grid view
8179

8280
```PowerShell
83-
PS C:\> ($A = Get-ChildItem -Path $pshome -Recurse) | Out-ConsoleGridView
81+
($A = Get-ChildItem -Path $pshome -Recurse) | Out-ConsoleGridView
8482
```
8583

8684
This command saves its output in a variable and sends it to **Out-ConsoleGridView**.
@@ -96,7 +94,7 @@ As a result, the output from the Get-ChildItem command is saved in the $A variab
9694
### Example 5: Output processes for a specified computer to a grid view
9795

9896
```PowerShell
99-
PS C:\> Get-Process -ComputerName "Server01" | ocgv -Title "Processes - Server01"
97+
Get-Process -ComputerName "Server01" | ocgv -Title "Processes - Server01"
10098
```
10199

102100
This command displays the processes that are running on the Server01 computer in a grid view window.
@@ -106,17 +104,17 @@ The command uses `ocgv`, which is the built-in alias for the **Out-ConsoleGridVi
106104
### Example 6: Define a function to kill processes using a graphical chooser
107105

108106
```PowerShell
109-
PS C:\> function killp { Get-Process | Out-ConsoleGridView -OutputMode Single -Filter $args[0] | Stop-Process -Id {$_.Id} }
110-
PS C:\> killp note
107+
function killp { Get-Process | Out-ConsoleGridView -OutputMode Single -Filter $args[0] | Stop-Process -Id {$_.Id} }
108+
killp note
111109
```
112110
This example shows defining a function named `killp` that shows a grid view of all running processes and allows the user to select one to kill it.
113111

114-
The example uses the `-Filter` paramter to filter for all proceses with a name that includes `note` (thus highlighting `Notepad` if it were running. Selecting an item in the grid view and pressing `ENTER` will kill that process.
112+
The example uses the `-Filter` parameter to filter for all proceses with a name that includes `note` (thus highlighting `Notepad` if it were running. Selecting an item in the grid view and pressing `ENTER` will kill that process.
115113

116114
### Example 7: Pass multiple items through Out-ConsoleGridView
117115

118116
```PowerShell
119-
PS C:\> Get-Process | Out-ConsoleGridView -PassThru | Export-Csv -Path .\ProcessLog.csv
117+
Get-Process | Out-ConsoleGridView -PassThru | Export-Csv -Path .\ProcessLog.csv
120118
```
121119

122120
This command lets you select multiple processes from the **Out-ConsoleGridView** window.

docs/Microsoft.PowerShell.ConsoleGuiTools/Show-ObjectTree.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ Show-ObjectTree [-InputObject <PSObject>] [-Title <string>] [-Filter <string>] [
2424

2525
The **Show-ObjectTree** cmdlet sends the output from a command to a tree view window where the output is displayed in an interactive tree.
2626

27-
You can use the following features of the tree to examine your data:
28-
29-
- Quick Filter. Use the Filter box at the top of the window to search the text in the tree. You can search for literals or multiple words. You can use the `-Filter` command to pre-populate the Filter box. The filter uses regular expressions.
27+
Use the Filter box at the top of the window to search the text in the tree including literals or multiple words. Use the `-Filter` parameter to pre-populate the Filter box. The filter uses regular expressions.
3028

3129
For instructions for using these features, type `Get-Help Show-ObjectTree -Full` and see How to Use the Tree View Window Features in the Notes section.
3230

@@ -35,20 +33,21 @@ For instructions for using these features, type `Get-Help Show-ObjectTree -Full`
3533
### Example 1: Output processes to a tree view
3634

3735
```PowerShell
38-
PS C:\> Get-Process | Show-ObjectTree
36+
Get-Process | Show-ObjectTree
3937
```
4038

4139
This command gets the processes running on the local computer and sends them to a tree view window.
4240

4341
### Example 2: Save output to a variable, and then output a tree view
4442

4543
```PowerShell
46-
PS C:\> ($A = Get-ChildItem -Path $pshome -Recurse) | shot
44+
($A = Get-ChildItem -Path $pshome -Recurse) | shot
4745
```
4846

4947
This command saves its output in a variable and sends it to **Show-ObjectTree**.
5048

5149
The command uses the Get-ChildItem cmdlet to get the files in the Windows PowerShell installation directory and its subdirectories.
50+
5251
The path to the installation directory is saved in the $pshome automatic variable.
5352

5453
The command uses the assignment operator (=) to save the output in the $A variable and the pipeline operator (|) to send the output to **Show-ObjectTree**.
@@ -76,7 +75,7 @@ Accept wildcard characters: False
7675
### -InputObject
7776
Specifies that the cmdlet accepts input for **Show-ObjectTree**.
7877
79-
When you use the **InputObject** parameter to send a collection of objects to **Show-ObjectTree**, **Show-ObjectTree** treats the collection as one collection object, and it displays one row that represents the collection.
78+
The **InputObject** parameter enables sending a collection of objects to **Show-ObjectTree**, **Show-ObjectTree** treats the collection as one collection object, and it displays one row that represents the collection.
8079
8180
To display the each object in the collection, use a pipeline operator (|) to send objects to **Show-ObjectTree**.
8281
@@ -141,7 +140,7 @@ You can send any object to this cmdlet.
141140

142141
## NOTES
143142

144-
* The command output that you send to **Show-ObjectTree** should not be formatted, such as by using the Format-Table or Format-Wide cmdlets. To select properties, use the Select-Object cmdlet.
143+
* The command output sent to **Show-ObjectTree** should not be formatted, such as by using the Format-Table or Format-Wide cmdlets. To select properties, use the Select-Object cmdlet.
145144

146145
* Deserialized output from remote commands might not be formatted correctly in the tree view window.
147146

0 commit comments

Comments
 (0)