< Back

Add-LineToFile

Sat Jan 11, 2020 2:33 pm

NAME Add-LineToFile



SYNOPSIS

This function adds a line to either the front or the back of a text file.





SYNTAX

Add-LineToFile [-path] <String> [-line] <String> [-front] [<CommonParameters>]



Add-LineToFile [-path] <String> [-line] <String> -back [<CommonParameters>]





DESCRIPTION





PARAMETERS

-path <String>

The path of the text file.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-line <String>

The line to add to the file.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-front [<SwitchParameter>]

Select to add the line to the front of the file.



Required? false

Position? named

Default value [Switch]::Present

Accept pipeline input? false

Accept wildcard characters? false



-back [<SwitchParameter>]

Select to add the line to the back of the file.



Required? true

Position? named

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



OUTPUTS





RELATED LINKS