I don't understand your question, but I think that this might be what you are looking for.
Given a deployment.txt file with this content...
Name=xyzzy
Folder=C:\Data
Security=Users
This PS code will change the folder value using regular expressions.
$data = Get-Content -Path C:\temp\deployment.txt
"Here is the data that we read in."
$data
$tagname = "Folder" # This is the tag that we want to look for
$value = "C:\Temp" # This is the new value
$find = "$tagname=(.*)" # This is the regex string to find the tag and whatever value it has.
$replace = "$tagname=$value" # This is the replacement string.
$updated = $data -replace $find,$replace
""
"Here is the updated content."
$updated
$updated | Set-Content -Path C:\temp\deployment.txt # Now update the file.
If you just want to overwrite the entire file, then pipe the variable to the set-content cmdlet, like I did in the last line of the script.