Get-LogProperties

擷取 Windows 事件記錄檔的屬性。

語法

Default (預設值)

Get-LogProperties
    [-Name] <Object>
    [<CommonParameters>]

Description

此 Cmdlet 只能在 Windows 平臺上使用。

此 Cmdlet 會取得 Windows 事件記錄檔的組態設定。 此 Cmdlet 由 Enable-PSTraceDisable-PSTrace Cmdlet 使用。

範例

範例 1:取得 Windows PowerShell 事件記錄檔的組態設定

Get-LogProperties 'Windows PowerShell'
Name       : Windows PowerShell
Enabled    : True
Type       : Admin
Retention  : False
AutoBackup : False
MaxLogSize : 15728640

參數

-Name

事件提供者的名稱。

參數屬性

類型:Object
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:0
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

String

您可以使用管線將包含記錄提供者名稱的字串傳送至此 Cmdlet。

輸出

Microsoft.PowerShell.Diagnostics.LogDetails

此 Cmdlet 會傳回 logDetails 物件

PSDiagnostics 模組會將logDetails 類別 新增至 Microsoft.PowerShell.Diagnostics 命名空間。