Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Set-Content

Set-Content - Powershell 2.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 »


Short description
Writes or replaces the content in an item with new content.

Set-Content [-LiteralPath] <string[]> [-Value] <Object[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filt
er <string>] [-Force] [-Include <string[]>] [-PassThru] [-Confirm] [-WhatIf] [-UseTransaction] [<CommonParameters>]

Set-Content [-Path] <string[]> [-Value] <Object[]> [-Credential <PSCredential>] [-Exclude <string[]>] [-Filter <str
ing>] [-Force] [-Include <string[]>] [-PassThru] [-Confirm] [-WhatIf] [-UseTransaction] [<CommonParameters>]

The Set-Content cmdlet is a string-processing cmdlet that writes or replaces the content in the specified item, suc
h as a file. Whereas the Add-Content cmdlet appends content to a file, Set-Content replaces the existing content. Y
ou can type the content in the command or send content through the pipeline to Set-Content.