$newcontent is still $content, so I don’t think it’s finding the text to replace, possibly because of the arrow characters in the text, possibly because of the wildcard. help?
How familiar are you with the concept of regular expressions in general and in Powershell in particular? It is used when you use comparison operators like -match and -replace.
That would lead to a command like this:
$newcontent= $content -Replace “.*T”,$new
to “fix” your code.
On the other hand I’m pretty sure there are probably better ways to manipulate a scheduled task than using string acrobatics. You might show some more of your code. We might help you with this.
so the text I need to replace, and the text I need to use to replace it, both contain characters that I can’t display in this forum because the forum thinks it’s code. and I can’t upload a screenshot. it’s the left and right arrow characters above the comma and period on the keyboard.
I went the XML route, and it replaces the text I want, but apparently that doesn’t actually affect the scheduled task anyway. i’m trying to change the Date in “startboundary” without changing the time.