-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Get-Process
fixes and refresh
#12007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-Process
fixes and refresh
#12007
Conversation
VM(M) was removed prior to Windows PowerShell v5.1. Handles was removed in v6.0. See: PowerShell/PowerShell#1812
This adds a Get-CimInstance/Invoke-CimMethod example as an alternative approach to Get-Process -IncludeUserName. It replaces the obsolete Get-WmiObject example that was present in the Windows PowerShell v5.1 doc. This also removes the incorrect assertion in the v7.x docs that -IncludeUserName requires elevation outright. That is only true for v5.1.
The Priority table view for Diagnostics.Process groups on the PriorityClass property. Format-Table expects input to already be sorted, but the original example used unsorted data, rendering it fairly unhelpful. This adds a call to Sort-Object and sorts on PriorityClass before calling Format-Table. This ensures all processes are correctly grouped by the Priority view. A script block is used in lieu of the property name directly, as the latter surfaces getter exceptions as a non-terminating error. This will occur with, e.g., PPL processes in Windows (even when elevated). Reference to PS home directory .ps1xml files is also removed from the v7.x docs. Format definitions were moved directly into source code in v6+. As a Format-* cmdlet is used, the term "display" is used to emphasize output is not intended for further processing.
This fixes incorrect markdown formatting and adds link references. This also ensures Get-Process output examples correctly reflect the PS version targeted by the doc. E.g., Windows PS v5.1 includes Handles in its default table view. This was removed in PS v6.0. See PS issue 1812. Windows PS v5.1 uses (K) in its table view; PS v6.0+ uses (M). Named parameters are added where appropriate. Minor verbiage changes and added notes have also been made.
…goldelephant/PowerShell-Docs into getProcessFixesAndRefresh
ExpectationsThanks for your submission! Here's a quick note to provide you with some context for what to expect from the docs team and the process now that you've submitted a PR. Even if you've contributed to this repo before, we strongly suggest reading this information; it might have changed since you last read it. To see our process for reviewing PRs, please read our editor's checklist and process for managing pull requests in particular. Below is a brief, high-level summary of what to expect, but our contributor guide has expanded details. The docs team begins to review your PR if you request them to or if your PR meets these conditions:
You can always request a review at any stage in your authoring process, the docs team is here to help! You do not need to submit a fully polished and finished draft; the docs team can help you get content ready for merge. While reviewing your PR, the docs team may make suggestions, write comments, and ask questions. When all requirements are satisfied, the docs team marks your PR as Approved and merges it. Once your PR is merged, it is included the next time the documentation is published. For this project, the documentation is published daily at 3 p.m. Pacific Standard Time (PST). |
Get-Process
fixes and refresh
Learn Build status updates of commit 3f3ecd2:
|
File | Status | Preview URL | Details |
---|---|---|---|
reference/5.1/Microsoft.PowerShell.Management/Get-Process.md | View (powershell-5.1) | Details | |
reference/7.4/Microsoft.PowerShell.Management/Get-Process.md | View (powershell-7.4) | Details | |
reference/7.5/Microsoft.PowerShell.Management/Get-Process.md | View (powershell-7.5) | Details | |
reference/7.6/Microsoft.PowerShell.Management/Get-Process.md | View (powershell-7.6) | Details |
reference/5.1/Microsoft.PowerShell.Management/Get-Process.md
- Line 0, Column 0: [Warning: link-out-of-scope - See documentation]
File '5.1/Microsoft.PowerShell.Core/Where-Object.md' referenced by link '../Microsoft.PowerShell.Core/Where-Object.md#description' will not be built because it is not included in build scope.
reference/7.4/Microsoft.PowerShell.Management/Get-Process.md
- Line 0, Column 0: [Warning: link-out-of-scope - See documentation]
File '7.4/Microsoft.PowerShell.Core/Where-Object.md' referenced by link '../Microsoft.PowerShell.Core/Where-Object.md#description' will not be built because it is not included in build scope.
reference/7.5/Microsoft.PowerShell.Management/Get-Process.md
- Line 0, Column 0: [Warning: link-out-of-scope - See documentation]
File '7.5/Microsoft.PowerShell.Core/Where-Object.md' referenced by link '../Microsoft.PowerShell.Core/Where-Object.md#description' will not be built because it is not included in build scope.
reference/7.6/Microsoft.PowerShell.Management/Get-Process.md
- Line 0, Column 0: [Warning: link-out-of-scope - See documentation]
File '7.6/Microsoft.PowerShell.Core/Where-Object.md' referenced by link '../Microsoft.PowerShell.Core/Where-Object.md#description' will not be built because it is not included in build scope.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
Learn Build status updates of commit 56c7b7a: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
PR Summary
This PR makes the following improvements to the
Get-Process
documentation.Fixes
Process
objects, including the correct units/descriptionsFormat-Table -View Priority
, ensuringProcess
objects are grouped by priority correctly.-IncludeUserName
requires elevation outright in v7.x..ps1xml
files in the PowerShell home directory.Additions
Where-Object
comparison statement to example 3 as a concise alternative to the existing code.Get-CimInstance/Invoke-CimMethod
code to example 8 as an alternative approach toGet-Process -IncludeUserName
.Get-WmiObject
code that was present in the Windows PowerShell v5.1 doc.Get-Process
with 64-bit processes in a 32-bit PowerShell host.PR Checklist