4/15/2025 PM Publish#12008
Merged
Taojunshen merged 2 commits intolivefrom Apr 15, 2025
Merged
Conversation
* Fix process default display column list VM(M) was removed prior to Windows PowerShell v5.1. Handles was removed in v6.0. See: PowerShell/PowerShell#1812 * Add module definition to Get-Process description * Add CIM alternative to Get-Process Example 8 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. * Improve Get-Process Ex 4 Priority grouping 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. * Add concise alternative to Get-Process Example 3 * Refresh Get-Process style/formatting and examples 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. * Add warning about Get-Process in a 32-bit PS host * Remove link references * Fix links * Editorial changes and fix link issue --------- Co-authored-by: Sean Wheeler <[email protected]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
PR Checklist