Skip to content

Commit 6653528

Browse files
Add concise alternative to Get-Process Example 3
1 parent a816099 commit 6653528

File tree

4 files changed

+56
-32
lines changed

4 files changed

+56
-32
lines changed

reference/5.1/Microsoft.PowerShell.Management/Get-Process.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,23 @@ You can also identify the processes by their process IDs. For instance, `Get-Pro
101101
### Example 3: Get all processes with a working set greater than a specified size
102102

103103
```powershell
104-
Get-Process | Where-Object {$_.WorkingSet -gt 20000000}
104+
Get-Process | Where-Object { $_.WorkingSet -gt 20000000 }
105+
Get-Process | Where-Object WorkingSet -GT 20MB
105106
```
106107

107-
This command gets all processes that have a working set greater than 20 MB. It uses the
108-
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) passes the process
109-
objects to the `Where-Object` cmdlet, which selects only the object with a value greater than
110-
20,000,000 bytes for the **WorkingSet** property.
108+
The first pipeline gets all processes that have a working set greater than 20 MB. It uses the
109+
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) pipes each
110+
**Process** object to the `Where-Object` cmdlet, which selects only objects with a **WorkingSet**
111+
value greater than `20000000` bytes.
111112

112-
**WorkingSet** is one of many properties of process objects. To see all of the properties, type
113-
`Get-Process | Get-Member`. By default, the values of all amount properties are in bytes, even
114-
though the default display lists them in kilobytes and megabytes.
113+
The second pipeline uses a
114+
[comparison statement](xref:Microsoft.PowerShell.Core.Where-Object#description) and the `MB`
115+
[numeric literal suffix](about_Numeric_Literals.md) as a concise alternative to the first pipeline.
116+
In PowerShell, `MB` represents a mebibyte (MiB) multiplier. `20MB` is equal to `20971520` bytes.
117+
118+
To see all properties of a **Process** object, use `Get-Process | Get-Member`. By default,
119+
PowerShell displays certain property values using units such as kilobytes (K) and megabytes (M). The
120+
actual values when accessed with the member-access operator (`.`) are in bytes.
115121

116122
### Example 4: Display processes on the computer in groups based on priority
117123

reference/7.4/Microsoft.PowerShell.Management/Get-Process.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,23 @@ You can also identify the processes by their process IDs. For instance, `Get-Pro
9898
### Example 3: Get all processes with a working set greater than a specified size
9999

100100
```powershell
101-
Get-Process | Where-Object {$_.WorkingSet -gt 20000000}
101+
Get-Process | Where-Object { $_.WorkingSet -gt 20000000 }
102+
Get-Process | Where-Object WorkingSet -GT 20MB
102103
```
103104

104-
This command gets all processes that have a working set greater than 20 MB. It uses the
105-
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) passes the process
106-
objects to the `Where-Object` cmdlet, which selects only the object with a value greater than
107-
20,000,000 bytes for the **WorkingSet** property.
105+
The first pipeline gets all processes that have a working set greater than 20 MB. It uses the
106+
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) pipes each
107+
**Process** object to the `Where-Object` cmdlet, which selects only objects with a **WorkingSet**
108+
value greater than `20000000` bytes.
108109

109-
**WorkingSet** is one of many properties of process objects. To see all of the properties, type
110-
`Get-Process | Get-Member`. By default, the values of all amount properties are in bytes, even
111-
though the default display lists them in kilobytes and megabytes.
110+
The second pipeline uses a
111+
[comparison statement](xref:Microsoft.PowerShell.Core.Where-Object#description) and the `MB`
112+
[numeric literal suffix](about_Numeric_Literals.md) as a concise alternative to the first pipeline.
113+
In PowerShell, `MB` represents a mebibyte (MiB) multiplier. `20MB` is equal to `20971520` bytes.
114+
115+
To see all properties of a **Process** object, use `Get-Process | Get-Member`. By default,
116+
PowerShell displays certain property values using units such as kilobytes (K) and megabytes (M). The
117+
actual values when accessed with the member-access operator (`.`) are in bytes.
112118

113119
### Example 4: Display processes on the computer in groups based on priority
114120

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,23 @@ You can also identify the processes by their process IDs. For instance, `Get-Pro
9898
### Example 3: Get all processes with a working set greater than a specified size
9999

100100
```powershell
101-
Get-Process | Where-Object {$_.WorkingSet -gt 20000000}
101+
Get-Process | Where-Object { $_.WorkingSet -gt 20000000 }
102+
Get-Process | Where-Object WorkingSet -GT 20MB
102103
```
103104

104-
This command gets all processes that have a working set greater than 20 MB. It uses the
105-
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) passes the process
106-
objects to the `Where-Object` cmdlet, which selects only the object with a value greater than
107-
20,000,000 bytes for the **WorkingSet** property.
105+
The first pipeline gets all processes that have a working set greater than 20 MB. It uses the
106+
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) pipes each
107+
**Process** object to the `Where-Object` cmdlet, which selects only objects with a **WorkingSet**
108+
value greater than `20000000` bytes.
108109

109-
**WorkingSet** is one of many properties of process objects. To see all the properties, type
110-
`Get-Process | Get-Member`. By default, the values of all amount properties are in bytes, even
111-
though the default display lists them in kilobytes and megabytes.
110+
The second pipeline uses a
111+
[comparison statement](xref:Microsoft.PowerShell.Core.Where-Object#description) and the `MB`
112+
[numeric literal suffix](about_Numeric_Literals.md) as a concise alternative to the first pipeline.
113+
In PowerShell, `MB` represents a mebibyte (MiB) multiplier. `20MB` is equal to `20971520` bytes.
114+
115+
To see all properties of a **Process** object, use `Get-Process | Get-Member`. By default,
116+
PowerShell displays certain property values using units such as kilobytes (K) and megabytes (M). The
117+
actual values when accessed with the member-access operator (`.`) are in bytes.
112118

113119
### Example 4: Display processes on the computer in groups based on priority
114120

reference/7.6/Microsoft.PowerShell.Management/Get-Process.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,23 @@ You can also identify the processes by their process IDs. For instance, `Get-Pro
9898
### Example 3: Get all processes with a working set greater than a specified size
9999

100100
```powershell
101-
Get-Process | Where-Object {$_.WorkingSet -gt 20000000}
101+
Get-Process | Where-Object { $_.WorkingSet -gt 20000000 }
102+
Get-Process | Where-Object WorkingSet -GT 20MB
102103
```
103104

104-
This command gets all processes that have a working set greater than 20 MB. It uses the
105-
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) passes the process
106-
objects to the `Where-Object` cmdlet, which selects only the object with a value greater than
107-
20,000,000 bytes for the **WorkingSet** property.
105+
The first pipeline gets all processes that have a working set greater than 20 MB. It uses the
106+
`Get-Process` cmdlet to get all running processes. The pipeline operator (`|`) pipes each
107+
**Process** object to the `Where-Object` cmdlet, which selects only objects with a **WorkingSet**
108+
value greater than `20000000` bytes.
108109

109-
**WorkingSet** is one of many properties of process objects. To see all the properties, type
110-
`Get-Process | Get-Member`. By default, the values of all amount properties are in bytes, even
111-
though the default display lists them in kilobytes and megabytes.
110+
The second pipeline uses a
111+
[comparison statement](xref:Microsoft.PowerShell.Core.Where-Object#description) and the `MB`
112+
[numeric literal suffix](about_Numeric_Literals.md) as a concise alternative to the first pipeline.
113+
In PowerShell, `MB` represents a mebibyte (MiB) multiplier. `20MB` is equal to `20971520` bytes.
114+
115+
To see all properties of a **Process** object, use `Get-Process | Get-Member`. By default,
116+
PowerShell displays certain property values using units such as kilobytes (K) and megabytes (M). The
117+
actual values when accessed with the member-access operator (`.`) are in bytes.
112118

113119
### Example 4: Display processes on the computer in groups based on priority
114120

0 commit comments

Comments
 (0)