< Back

Get-LogFile

Sat Jan 18, 2020 9:43 pm

NAME Get-LogFile



SYNOPSIS

Retrieves active LogFile objects.





SYNTAX

Get-LogFile [[-Path] <String>] [<CommonParameters>]





DESCRIPTION

Retrieves LogFile objects which are currently attached to the session's host interceptor.





PARAMETERS

-Path <String>

Path to a file for which you want to retrieve the associated PSLogFile object. If not specified, all active

PSLogFile objects are returned.



Required? false

Position? 0

Default value null

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

String







OUTPUTS

PowerShellLogging.LogFile







NOTES









-------------- Example 1 --------------



PS C:\\> Get-LogFile



Returns all PSLogFile objects currently attached to the host interceptor.

-------------- Example 2 --------------



PS C:\\> Get-LogFile -Path '.\\log.txt'



Retrieves PSLogFiles matching the specified path.



RELATED LINKS

Enable-LogFile

Disable-LogFile

about_PowerShellLogging