This is the built-in help made by Microsoft for the command 'Clear-History', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Deletes entries from the command history.
Clear-History [[-Id] [<Int32[]>]] [[-Count] [<Int32>]] [-Newest] [-Confirm] [-WhatIf] [<CommonParameters>]
Clear-History [[-Count] [<Int32>]] [-CommandLine [<String[]>]] [-Newest] [-Confirm] [-WhatIf] [<CommonParameters>]
The Clear-History cmdlet deletes commands from the command history, that is, the list of commands entered during the current session.
Without parameters, Clear-History deletes all commands from the session history, but you can use the parameters of Clear-History to delete selected commands.
<
Online Version: http://go.microsoft.com/fwlink/p/?linkid=289571
Add-History
Get-History
Invoke-History
about_History
<
-------------------------- EXAMPLE 1 --------------------------
PS C:\>clear-history
Deletes all commands from the session history.
-------------------------- EXAMPLE 2 --------------------------
PS C:\>clear-history -id 23, 25
Deletes the commands with history IDs 23 and 25.
-------------------------- EXAMPLE 3 --------------------------
PS C:\>clear-history -command *help*, *command
Deletes commands that include "help" or end in "command".
-------------------------- EXAMPLE 4 --------------------------
PS C:\>clear-history -count 10 -newest
Deletes the 10 newest commands from the history.
-------------------------- EXAMPLE 5 --------------------------
PS C:\>clear-history -id 10 -count 3
Deletes the three oldest commands, beginning with the entry with ID 10.