Microsoft.PowerShell.Utility module: setup and commands
Documentation: Microsoft Learn
Transform, measure, sort and export objects with Utility cmdlets while keeping formatting commands at the end of the pipeline.
Getting it
Ships with PowerShell everywhere and loads automatically at startup.
Examples
Show reference output
Show reference output
What it is for
Use it once data is already in hand and needs to be reduced, reordered, or written out. It is also where a report object gets built through Select-Object calculated properties, and where two collections get compared with Compare-Object.
Typical tasks
- Pick and rename properties for a report
- Group and count records by a field
- Export results to CSV or JSON
- Compare two collections for drift
- Time an operation with Measure-Command
- Emit diagnostic text through Write-Verbose
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it once data is already in hand and needs to be reduced, reordered, or written out. It is also where a report object gets built through Select-Object calculated properties, and where two collections get compared with Compare-Object.
Primary documentation
Export-Csv reference · ConvertTo-Json reference · Where-Object reference