Skip to content

Instantly share code, notes, and snippets.

@MattHodge
Last active August 29, 2015 14:26
Show Gist options
  • Save MattHodge/af0832fd863745168e5d to your computer and use it in GitHub Desktop.
Save MattHodge/af0832fd863745168e5d to your computer and use it in GitHub Desktop.
Escaping PowerShell
$title = "This is Matt's Page"
$price = 20
$color = 'red'
$html =
"
<HTML>
<HEAD>
<TITLE>$($title)</TITLE>
<BODY>
<font color=""$($color)"">
The price for this advice is `$$($price) please.<P>
The price for bwminstead is `$100 though... <P>
Another price might be $10000 moneys.
</BODY>
</HTML>
"
Set-Content -Path 'c:\test\page.html' -Value $html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment