Skip to content

Instantly share code, notes, and snippets.

@MattHodge
Last active November 8, 2015 13:05
Show Gist options
  • Save MattHodge/4a16275707261e81b36c to your computer and use it in GitHub Desktop.
Save MattHodge/4a16275707261e81b36c to your computer and use it in GitHub Desktop.
Description for 07_Blog_PSStringFormating_HashTables_WebSite.ps1
$webData = @{
name = 'Matt'
fontcolor = 'red'
type = 'beer'
price = '6.00'
age = 29
}
$htmlPage = "
<html>
<head>
<title>$($name.title)'s Web Page!</title>
</head>
<body>
<{0}>Welcome to $($webData.name)'s Web Page!</{0}>
<p>
<font color=""$($webData.fontcolor)"">$($webData.name)'s Age is ""$($webData.age)"".</font>
<p>
This means he can buy a $($webData.type) for `$$($webData.price)!
</body>
</html>
" -f 'h1'
Set-Content -Path C:\Temp\MyPage.html -Value $htmlPage
@MattHodge
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment