PackageDeployment Module Help

Package Deployment Module

Read-ReplaceString Cmdlet

Version 4.0.0.5

Read-ReplaceString

Synopsis

Replace within string

Syntax

Read-ReplaceString [-String] <String> [-Find] <String> [-Replace] <String> [-ContinueOnError] [-ResultVariable] <String> [<CommonParameters>]

Description

Searches for a set sub string in a string and replaces this sub string with another. If the search is not unique the string is replaced starting on the left and going forward.
Example: The string is AHAHAHA.
Search for AHA and Replace with NOO results in a string NOOHNOO.
Wildcards are not supported.

Parameters

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-Find <String>

Substring that is being sought.

Required

True

Position

1

Accepts pipeline input

False

-Replace <String>

The found substring is replaced with this string.

Required

True

Position

2

Accepts pipeline input

False

-ResultVariable <String>

A variable that collects the result.

Required

True

Position

3

Accepts pipeline input

False

-String <String>

The string in which characters should be replaced.

Required

True

Position

0

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".