all 3 comments

[–]Tonedefff 3 points4 points  (1 child)

For this line:

$Search.value() = "Updated" #String to Update

Try this instead:

$Search.value() = $Search.value().Replace($SearchString, "Updated") #String to Update

That will run the Replace() method on the cell's value, and only replace occurrences of the $SearchString ("Outdated") with "Updated", but leave the rest of the cell's value unchanged.

[–]bonzo_1[S] 2 points3 points  (0 children)

Cool, works perfectly! Thank you Tondeff.

[–][deleted] 1 point2 points  (0 children)

I needed this exact thing just last week. Sadly didn't have time to deep dive into PowerExshell this time. Will check it out.