CmdID

CmdID / PowerShell / Cmdlets / Set

Set-LogProperties

Changes the properties of a Windows event log. PowerShell reference

From the PowerShell reference 2 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Changes the properties of a Windows event log. This cmdlet changes the configuration settings of a Windows event log. This cmdlet is used by the Enable-PSTrace and Disable-PSTrace cmdlets. You must run this cmdlet from an elevated PowerShell session.

Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>]

Change the retention setting of the Windows PowerShell event log

$logDetails = Get-LogProperties 'Windows PowerShell' $logDetails.Retention = $true Set-LogProperties -LogDetails $logDetails Get-LogProperties 'Windows PowerShell'Identify

Its page in the reference: Set-LogProperties.

Parameters

2 in the PowerShell reference
-ForceUsed to force the change without prompting.
-LogDetailsThe updated configuration settings to be assigned to the event log.