Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Set-Content

Set-Content - 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 »

Set-Content

Short description
Replaces the contents of a file with contents that you specify.

Syntax


Description
The Set-Content cmdlet is a string-processing cmdlet that writes or replaces the content in the specified item, such as
 a file. Whereas the Add-Content cmdlet appends content to a file, Set-Content replaces the existing content. You can t
ype the content in the command or send content through the pipeline to Set-Content.

In file system drives, the Set-Content cmdlet overwrites or replaces the content of one or more files with the content 
that you specify. This cmdlet is not valid on folders.

Note: This custom cmdlet help file explains how the Set-Content cmdlet works in a file system drive. For information ab
out the Set-Content cmdlet in all drives, type "Get-Help Set-Content -Path $null" or see Set-Content at http://go.micro
soft.com/fwlink/?LinkID=113392.