A tag is a label attached to an informational message or software artifact for classification and filtering. In PowerShell, tags organize Information stream records; in a module manifest, they help describe and discover a project. section 13.4 section 22.4.2
Use tags to make automation output easier to manage:
- Label messages by role, such as Process, Meta, Data, status, or notice. section 13.4
- Capture messages in an information variable and filter records through their Tags property. section 13.4
- Add searchable keywords to a published module's manifest metadata. section 22.4.2
Filter tagged information
Write-Information "Starting" -Tag Process; Write-Information "No parameters" -Tag Notice; then filter captured records with $x | Where Tags -in @('Notice'). section 13.4
Function Example {
[CmdletBinding()]
Param()
Write-Information "First message" -tag status
Write-Information "Note that this had no parameters" -tag notice
Write-Information "Second message" -tag status
}
Example -InformationAction Continue -InformationVariable x
Shows a function that emits status and notice messages, captures them, and enables informational output. section 13.4





