Been slamming my head against the wall on this one but essentially I had a curl command and it contained a replace (sed) command and I would like to convert this to the powershell equivalent of using replace and I feel like my order of quotes/escaping text isn't quite right.
My output would be like so: "cattle.io/timestamp":"2022-02-22T11:11:00Z"
And the only part i would like to change is the date/time stamp so that it updates to the current datetime.
The following works in curl: sed "s/\"cattle\.io\/timestamp\"\:\"[0-9T:Z-]*\"/\"cattle\.io\/timestamp\":\"(date -u +"%Y-%m-%dT%H:%M:%SZ")"/g"
I thought it would be something like: replace '"cattle.io/timestamp":"[0-9T:Z-]*"','"cattle.io/timestamp":"(date -uformat +"%Y-%m-%dT%H:%M:%SZ")' using single quotes to escape but apparently not.