Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Clear-Item

Clear-Item - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Clear-Item

Short description
Deletes the contents of an item, but does not delete the item.

Syntax
Clear-Item [-Path] <String[]> [-Credential <PSCredential>] [-Exclude <String[]>] [-Filter <String>] [-Force] [-Include 
<String[]>] [-Confirm] [-WhatIf] [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]
Clear-Item [-Credential <PSCredential>] [-Exclude <String[]>] [-Filter <String>] [-Force] [-Include <String[]>] -Litera
lPath <String[]> [-Confirm] [-WhatIf] [-UseTransaction [<SwitchParameter>]] [<CommonParameters>]





Description
The Clear-Item cmdlet deletes the value of an item, but it does not delete the item. For example, Clear-Item can delete
 the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defin
ed by each Windows PowerShell provider.  Clear-Item is similar to Clear-Content, but it works on aliases and variables,
 instead of files.