### set the variable fields $webData = @{ name = "John Smith" type = "Beer" price = '8.99' } $htmlPage =" <html> <head> <title>$($webData.name)'s Web Page!</title> </head> <body> <{0}>Welcome to $($webData.name)'s web Page!</{0}> This means he can buy $($webData.type) for $($webData.price)! <p> Current Date and Time: $($(Get-Date -format f)) <p> </body> </htm1> " -f 'h1' $file="C:\\Users\\nfgom\\Downloads\\test.html" Set-content -Path $file -Value $htmlPage Invoke-Item $file
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter