# encoding: ascii
# api: powershell
# title: Find and Replace Data
# description: You know unwanted data is in a string within a file, but you don’t know what it is. You need to have it replaced with a scheduled ps1 script.
# version: 0.1
# author: Danielle
# license: CC0
# x-poshcode-id: 6747
# x-archived: 2017-05-22T05:27:04
# x-published: 2017-02-22T18:10:00
#
#
##### Get current Content-ID in Preamble.xml
cat ./Preamble.xml | findstr Content-ID: > ./Content-ID
$ID = Get-Content ./Content-ID
$ID = $ID.substring(13,15)
##### Replace Content-ID in Preamble.xml
( Get-Content ./Preamble.xml ) -replace "$ID" , "$STAMP" |
Set-Content ./Preamble.xml