Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

Syntax

$cs.File_DeleteLineInFile(string file, string text, bool onlyfirstmatch = true, bool ignorecase = true)

Parameters

file

File to remove text from

text

Text to remove

onlyfirstmatch

Only delete first occurrence of text

ignorecase

Ignore text case

Example

$cs.File_DeleteLineInFile("$env:windir\System32\Drivers\etc\hosts","127.0.0.1    assets.cloud.barco.com")

returns nothing

  • No labels