-
Notifications
You must be signed in to change notification settings - Fork 5
Get JournalFiles
external help file: JournalCli.dll-Help.xml
Module Name: JournalCli
online version:
schema: 2.0.0
Returns journal entries as file
objects, which enables text searching via the Select-String
cmdlet.
Get-JournalFiles [-From <DateTime>] [-To <DateTime>] [-Tags <String[]>] [-Location <String>]
[<CommonParameters>]
The primary purpose of this cmdlet is to enable text searching via PowerShell's Select-String
cmdlet, which operates best when provided file objects. Use this cmdlet to retrieve a subset of journal entries, filtered by date and/or tags, and pipe the results into Select-String
to get detailed information about where certain words or phrases can be found in your journal. Results include the entry file name, the matching line of text, and the line number where the text was found.
PS C:\> Get-JournalFiles -Tags family |
Select-String 'christmas dinner' |
Format-Table -Property LineNumber,Line,FileName
Finds all journal entries that are tagged family
, searches them for the phrase christmas dinner
, and displays the line of text, line number, and file name where the phrase was found in a tabular format.
PS C:\> Get-JournalFiles -From '2019.12.20' -To '2019.12.30' |
Select-String 'canasta' |
Format-Table -Property LineNumber,Line,FileName
Finds all journal entries created between December 20th, 2019 and December 30th 2019, searches them for the phrase canasta
, and displays the line of text, line number, and file name where the phrase was found in a tabular format.
Limits returned journal entries to those created on or after the specified date.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The root directory for the journal to search for entries. This is only required if no default journal location has been set, or to search a non-default location.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
An array of tags used to filter the list of journal entries.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Limits returned journal entries to those created on or before the specified date. The default value is Today
.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.