< Back
Clear-HPESysInfoLog
Post
NAME Clear-HPESysInfoLog
SYNOPSIS
The Clear-HPESysInfoLog cmdlet clears one or more logs created by the HPESysInfoCmdlets module.
SYNTAX
Clear-HPESysInfoLog [[-Last] <UInt32>] [[-Force] <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Clear-HPESysInfoLog cmdlet clears one or more logs created by the HPESysInfoCmdlets module. You are prompted
for confirmation unless you specify the Force parameter.
PARAMETERS
-Last [<UInt32>]
Specifies the integer as value. If you specify the value as X, then X number of logs in the descending order
of their age, or the older logs, are cleared. If you do not use a parameter, all the existing logs including
the current log are cleared.
Required? false
Position? 0
Default value 0
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Clears all the existing logs without prompting for confirmation. By default, Clear-HPESysInfoLog prompts for
confirmation before clearing any logs from the module installation folder.
Required? false
Position? 1
Default value False
Accept pipeline input? False
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
System.UInt32
OUTPUTS
None
If the cmdlet executes successfully, it does not return anything. In case of an error, the error will be
thrown.
EXAMPLE 1
Clear all the logs created by the HPESysInfoCmdlets module.PS C:\\> Clear-HPESysInfoLog
Do you really want to clear all the logs?
[Y] Yes [N] No [S] Suspend
EXAMPLE 2
The first five logs in the descending order of their age, or the older logs, are cleared.C:\\PS>
Clear-HPESysInfoLog -Last 5
EXAMPLE 3
Clears all the existing logs without prompting for confirmation.C:\\PS> Clear-HPESysInfoLog -Force
RELATED LINKS
http://www.hpe.com/servers/powershell
Enable-HPESysInfoLog
Disable-HPESysInfoLog
SYNOPSIS
The Clear-HPESysInfoLog cmdlet clears one or more logs created by the HPESysInfoCmdlets module.
SYNTAX
Clear-HPESysInfoLog [[-Last] <UInt32>] [[-Force] <SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Clear-HPESysInfoLog cmdlet clears one or more logs created by the HPESysInfoCmdlets module. You are prompted
for confirmation unless you specify the Force parameter.
PARAMETERS
-Last [<UInt32>]
Specifies the integer as value. If you specify the value as X, then X number of logs in the descending order
of their age, or the older logs, are cleared. If you do not use a parameter, all the existing logs including
the current log are cleared.
Required? false
Position? 0
Default value 0
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Clears all the existing logs without prompting for confirmation. By default, Clear-HPESysInfoLog prompts for
confirmation before clearing any logs from the module installation folder.
Required? false
Position? 1
Default value False
Accept pipeline input? False
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
System.UInt32
OUTPUTS
None
If the cmdlet executes successfully, it does not return anything. In case of an error, the error will be
thrown.
EXAMPLE 1
Clear all the logs created by the HPESysInfoCmdlets module.PS C:\\> Clear-HPESysInfoLog
Do you really want to clear all the logs?
[Y] Yes [N] No [S] Suspend
EXAMPLE 2
The first five logs in the descending order of their age, or the older logs, are cleared.C:\\PS>
Clear-HPESysInfoLog -Last 5
EXAMPLE 3
Clears all the existing logs without prompting for confirmation.C:\\PS> Clear-HPESysInfoLog -Force
RELATED LINKS
http://www.hpe.com/servers/powershell
Enable-HPESysInfoLog
Disable-HPESysInfoLog