Skip to content

Commit 13244ad

Browse files
Add warning about Get-Process in a 32-bit PS host
1 parent 0a755de commit 13244ad

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,13 @@ Windows PowerShell includes the following aliases for `Get-Process`:
462462
- `gps`
463463
- `ps`
464464

465-
On computers that are running a 64-bit version of Windows, the 64-bit version of PowerShell gets
466-
only 64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
465+
On computers running 64-bit Windows, the 64-bit version of PowerShell gets the main module and
466+
64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
467+
468+
> [!WARNING]
469+
> When you use `Get-Process` to get a 64-bit process in the 32-bit version of PowerShell, properties
470+
> such as `Path` and `MainModule` of the returned **Process** object are `$null`. You must use
471+
> either the 64-bit version of PowerShell or the [Win32_Process][08] class.
467472

468473
To get process information from a remote computer, use the `Invoke-Command` cmdlet. For more
469474
information, see [Invoke-Command][07].

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,13 @@ PowerShell includes the following aliases for `Get-Process`:
424424
- Windows:
425425
- `ps`
426426

427-
On computers that are running a 64-bit version of Windows, the 64-bit version of PowerShell gets
428-
only 64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
427+
On computers running 64-bit Windows, the 64-bit version of PowerShell gets the main module and
428+
64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
429+
430+
> [!WARNING]
431+
> When you use `Get-Process` to get a 64-bit process in the 32-bit version of PowerShell, properties
432+
> such as `Path` and `MainModule` of the returned **Process** object are `$null`. You must use
433+
> either the 64-bit version of PowerShell or the [Win32_Process][08] class.
429434

430435
To get process information from a remote computer, use the `Invoke-Command` cmdlet. For more
431436
information, see [Invoke-Command][07].

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,13 @@ PowerShell includes the following aliases for `Get-Process`:
424424
- Windows:
425425
- `ps`
426426

427-
On computers that are running a 64-bit version of Windows, the 64-bit version of PowerShell gets
428-
only 64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
427+
On computers running 64-bit Windows, the 64-bit version of PowerShell gets the main module and
428+
64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
429+
430+
> [!WARNING]
431+
> When you use `Get-Process` to get a 64-bit process in the 32-bit version of PowerShell, properties
432+
> such as `Path` and `MainModule` of the returned **Process** object are `$null`. You must use
433+
> either the 64-bit version of PowerShell or the [Win32_Process][08] class.
429434

430435
To get process information from a remote computer, use the `Invoke-Command` cmdlet. For more
431436
information, see [Invoke-Command][07].

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,13 @@ PowerShell includes the following aliases for `Get-Process`:
424424
- Windows:
425425
- `ps`
426426

427-
On computers that are running a 64-bit version of Windows, the 64-bit version of PowerShell gets
428-
only 64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
427+
On computers running 64-bit Windows, the 64-bit version of PowerShell gets the main module and
428+
64-bit process modules. The 32-bit version of PowerShell gets only 32-bit process modules.
429+
430+
> [!WARNING]
431+
> When you use `Get-Process` to get a 64-bit process in the 32-bit version of PowerShell, properties
432+
> such as `Path` and `MainModule` of the returned **Process** object are `$null`. You must use
433+
> either the 64-bit version of PowerShell or the [Win32_Process][08] class.
429434

430435
To get process information from a remote computer, use the `Invoke-Command` cmdlet. For more
431436
information, see [Invoke-Command][07].

0 commit comments

Comments
 (0)